+ const piece = move.vanish[0].p;
+ // Update king position + flags
+ if (piece == V.KING) {
+ const shift =
+ ([V.HAWK, V.ELEPHANT, V.NOTHING].includes(move.appear[0].p) ? 1 : 0);
+ this.kingPos[color][0] = move.appear[shift].x;
+ this.kingPos[color][1] = move.appear[shift].y;
+ }
+ this.updateCastleFlags(move, piece);
+
+ const oppCol = this.turn;