Several small improvements + integrate options + first working draft of Cwda
[vchess.git] / client / src / variants / Pacosako.js
index 0b27be4..0462d2d 100644 (file)
@@ -199,9 +199,9 @@ export class PacosakoRules extends ChessRules {
     );
   }
 
-  static GenRandInitFen(randomness) {
+  static GenRandInitFen(options) {
     // Add 16 pawns flags + empty umove:
-    return ChessRules.GenRandInitFen(randomness)
+    return ChessRules.GenRandInitFen(options)
       .slice(0, -2) + "1111111111111111 - -";
   }
 
@@ -372,7 +372,7 @@ export class PacosakoRules extends ChessRules {
     }
     let baseMoves = [];
     const c = this.turn;
-    switch (piece || this.getPiece(x, y)) {
+    switch (piece) {
       case V.PAWN: {
         const firstRank = (c == 'w' ? 7 : 0);
         baseMoves = this.getPotentialPawnMoves([x, y]).filter(m => {