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/%7B%7B%20path%28%27mixstore_store_usecase_delete%27%2C%20%7B%20id:%20ucs.id%20%7D%29%20%7D%7D?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"; }