From: Benjamin Auder Date: Tue, 16 Feb 2021 22:09:43 +0000 (+0100) Subject: Fix Pandemonium updateCastleFlags() X-Git-Url: https://git.auder.net/pieces/%7B%7B%20path%28%27fos_user_change_password%27%29%20%7D%7D?a=commitdiff_plain;h=acf207122fb8aa86ea9fb8ae1b34d9d301995414;p=vchess.git Fix Pandemonium updateCastleFlags() --- diff --git a/client/src/variants/Pandemonium.js b/client/src/variants/Pandemonium.js index dae08861..287aa3bf 100644 --- a/client/src/variants/Pandemonium.js +++ b/client/src/variants/Pandemonium.js @@ -648,7 +648,7 @@ export class PandemoniumRules extends ChessRules { } updateCastleFlags(move, piece) { - if (move.appear.length == 2) { + if (piece == V.KING && move.appear.length == 2) { // Castling (only move which disable flags) this.castleFlags[move.appear[0].c][0] = 10; this.castleFlags[move.appear[0].c][1] = 10;