X-Git-Url: https://git.auder.net/images/pieces/Cwda/bt.svg?a=blobdiff_plain;f=public%2Fjavascripts%2Fvariants%2FLoser.js;h=dcc5c112e9740083edfc6f61fb3583953320ef23;hb=f6dbe8e31a3260487664f1e0b50710b3f3efaf5f;hp=5f15612980575458acc51c0022921338f83fceb3;hpb=2d7194bd9c976f444e43e5dc0a725823b6472eb9;p=vchess.git diff --git a/public/javascripts/variants/Loser.js b/public/javascripts/variants/Loser.js index 5f156129..dcc5c112 100644 --- a/public/javascripts/variants/Loser.js +++ b/public/javascripts/variants/Loser.js @@ -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) { } @@ -193,3 +183,5 @@ class LoserRules extends ChessRules " w -"; //no en-passant } } + +const VariantRules = LoserRules;