+ if (this.movesCount > 4) {
+ let piece = move.vanish[0].p;
+ if (['j', 'l'].includes(piece)) piece = V.KING;
+ if (piece == V.KING && move.appear.length > 0)
+ this.kingPos[c] = [move.appear[0].x, move.appear[0].y];
+ this.updateCastleFlags(move, piece);
+ }