X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fvariants%2FLoser.js;h=0ed3edc2ee294c2ec033bd30b5e0cb039e3072e5;hb=6752407b88b6d7678b9b19df4ffe1224d17625d7;hp=0c484c128fde922b1201cc8806a26770e7f109da;hpb=a6abf094c35a26019e47fea21302c4be32ff030b;p=vchess.git diff --git a/public/javascripts/variants/Loser.js b/public/javascripts/variants/Loser.js index 0c484c12..0ed3edc2 100644 --- a/public/javascripts/variants/Loser.js +++ b/public/javascripts/variants/Loser.js @@ -2,7 +2,8 @@ class LoserRules extends ChessRules { initVariables(fen) { - // No castling, hence no flags + // 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 ]; } @@ -102,21 +103,10 @@ class LoserRules extends ChessRules return []; } - play(move, ingame) - { - if (!!ingame) - move.notation = this.getNotation(move); - this.moves.push(move); - this.epSquares.push( this.getEpSquare(move) ); - VariantRules.PlayOnBoard(this.board, move); - } - - undo(move) - { - VariantRules.UndoOnBoard(this.board, move); - this.epSquares.pop(); - this.moves.pop(); - } + // Unused: + updateVariables(move) { } + unupdateVariables(move) { } + parseFlags(flags) { } checkGameEnd() {