Add Spartan Chess
[vchess.git] / client / src / base_rules.js
index 6502679..0a68127 100644 (file)
@@ -163,7 +163,6 @@ export const ChessRules = class ChessRules {
 
   // Check if FEN describes a board situation correctly
   static IsGoodFen(fen) {
-console.log("ddd");
     const fenParsed = V.ParseFen(fen);
     // 1) Check position
     if (!V.IsGoodPosition(fenParsed.position)) return false;
@@ -714,7 +713,7 @@ console.log("ddd");
       let j = y + step[1];
       while (V.OnBoard(i, j) && this.board[i][j] == V.EMPTY) {
         moves.push(this.getBasicMove([x, y], [i, j]));
-        if (oneStep) continue outerLoop;
+        if (!!oneStep) continue outerLoop;
         i += step[0];
         j += step[1];
       }
@@ -1073,8 +1072,7 @@ console.log("ddd");
         V.OnBoard(rx, ry) &&
         this.board[rx][ry] != V.EMPTY &&
         this.getPiece(rx, ry) == piece &&
-        this.getColor(rx, ry) == color &&
-        this.canTake([rx, ry], [x, y]) //for Paco-Sako (TODO: necessary?)
+        this.getColor(rx, ry) == color
       ) {
         return true;
       }