X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FFootball.js;fp=client%2Fsrc%2Fvariants%2FFootball.js;h=ffe6736b1daf268e29d0972a7699015392c20906;hp=eddad1070a90f74a7b0d5c7d6061b02ac725149c;hb=63c42a8fd6ba2150af5c6f25afe7aaf5f20599aa;hpb=45f79d0fff3d70ba064635e44a89ffd31aaf90f7 diff --git a/client/src/variants/Football.js b/client/src/variants/Football.js index eddad107..ffe6736b 100644 --- a/client/src/variants/Football.js +++ b/client/src/variants/Football.js @@ -363,7 +363,7 @@ export class FootballRules extends ChessRules { play(move) { // Special message saying "passes are over" - const passesOver = (move.vanish.length == 2); + const passesOver = (move.vanish.length == 0); if (!passesOver) { this.prePlay(move); V.PlayOnBoard(this.board, move); @@ -385,7 +385,7 @@ export class FootballRules extends ChessRules { } undo(move) { - const passesOver = (move.vanish.length == 2); + const passesOver = (move.vanish.length == 0); if (move.turn[0] != this.turn) { [this.turn, this.subTurn] = move.turn; this.movesCount--; @@ -439,7 +439,7 @@ export class FootballRules extends ChessRules { // NOTE: evalPosition() is wrong, but unused since bot plays at random getNotation(move) { - if (move.vanish.length == 2) return "pass"; + if (move.vanish.length == 0) return "pass"; if (move.vanish[0].p != 'a') return super.getNotation(move); // Kick: simple notation (TODO?) return V.CoordsToSquare(move.end);