Simplified underCheck / getCheckSquares logic. Debugging Berolina
[vchess.git] / public / javascripts / variants / Loser.js
index 6731d32..dcc5c11 100644 (file)
@@ -2,16 +2,6 @@ class LoserRules extends ChessRules
 {
        static get HasFlags() { return false; }
 
-       setOtherVariables(fen)
-       {
-               const parsedFen = V.ParseFen(fen);
-               const epSq = parsedFen.enpassant != "-"
-                       ? V.SquareToCoords(parsedFen.enpassant)
-                       : undefined;
-               this.epSquares = [ epSq ];
-               this.scanKingsRooks(fen);
-       }
-
        getPotentialPawnMoves([x,y])
        {
                let moves = super.getPotentialPawnMoves([x,y]);
@@ -97,7 +87,7 @@ class LoserRules extends ChessRules
                return moves;
        }
 
-       underCheck(move)
+       underCheck(color)
        {
                return false; //No notion of check
        }
@@ -107,7 +97,7 @@ class LoserRules extends ChessRules
                return [];
        }
 
-       // No variables update because no castling
+       // No variables update because no royal king + no castling
        updateVariables(move) { }
        unupdateVariables(move) { }