Fix Pandemonium updateCastleFlags()
authorBenjamin Auder <benjamin.auder@somewhere>
Tue, 16 Feb 2021 22:09:43 +0000 (23:09 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Tue, 16 Feb 2021 22:09:43 +0000 (23:09 +0100)
client/src/variants/Pandemonium.js

index dae0886..287aa3b 100644 (file)
@@ -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;