From: Benjamin Auder Date: Tue, 16 Feb 2021 22:09:43 +0000 (+0100) Subject: Fix Pandemonium updateCastleFlags() X-Git-Url: https://git.auder.net/js/pieces/%7B%7B%20asset%28%27mixstore/doc/html/parser.js?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;