From: Benjamin Auder Date: Sat, 1 Dec 2018 12:27:57 +0000 (+0100) Subject: Fix Loser chess X-Git-Url: https://git.auder.net/pieces/Cwda/scripts/doc/rpsls.js?a=commitdiff_plain;h=1970e049ee112032977909f5716fc1e5887214d7;p=vchess.git Fix Loser chess --- diff --git a/public/javascripts/variants/Loser.js b/public/javascripts/variants/Loser.js index 0ed3edc2..b4d8b4f0 100644 --- a/public/javascripts/variants/Loser.js +++ b/public/javascripts/variants/Loser.js @@ -2,13 +2,15 @@ class LoserRules extends ChessRules { initVariables(fen) { - // No castling, hence no flags; but flags defined for compatibility - this.flags = "-"; const epSq = this.moves.length > 0 ? this.getEpSquare(this.lastMove) : undefined; this.epSquares = [ epSq ]; } - setFlags(fen) { } + setFlags(fen) + { + // No castling, hence no flags; but flags defined for compatibility + this.castleFlags = "0000"; + } getPotentialPawnMoves([x,y]) {