From accbe54afe4b94ec93f884f32ba3195ec782dee9 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Wed, 17 Feb 2021 15:15:59 +0100 Subject: [PATCH] Alice: fix castling notation --- client/src/variants/Alice.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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"; } -- 2.44.0