From: Benjamin Auder Date: Wed, 17 Feb 2021 14:15:59 +0000 (+0100) Subject: Alice: fix castling notation X-Git-Url: https://git.auder.net/variants/%24%7Bvname%7D/current/img/doc/html/%7B%7B?a=commitdiff_plain;h=accbe54afe4b94ec93f884f32ba3195ec782dee9;p=vchess.git Alice: fix castling notation --- diff --git a/client/src/variants/Alice.js b/client/src/variants/Alice.js index 16ccb84d..e33cbdd7 100644 --- a/client/src/variants/Alice.js +++ b/client/src/variants/Alice.js @@ -169,7 +169,8 @@ export class AliceRules extends ChessRules { return false; } } - } else if (this.board[m.end.x][m.end.y] != V.EMPTY) { + } + else if (this.board[m.end.x][m.end.y] != V.EMPTY) { // Attempt to capture const piece = this.getPiece(m.end.x, m.end.y); if ( @@ -347,7 +348,7 @@ export class AliceRules extends ChessRules { } getNotation(move) { - if (move.appear.length == 2 && move.appear[0].p == V.KING) { + if (move.appear.length == 2) { if (move.end.y < move.start.y) return "0-0-0"; return "0-0"; }