- if (Math.abs(move.end.y - this.INIT_COL_ROOK[c][0]) <= 1)
- this.castleFlags[c][0] = false;
- if (Math.abs(move.end.y - this.INIT_COL_ROOK[c][1]) <= 1)
- this.castleFlags[c][1] = false;
+ if (Math.abs(move.end.y - this.castleFlags[c][0]) <= 1)
+ this.castleFlags[c][0] = 8;
+ if (Math.abs(move.end.y - this.castleFlags[c][1]) <= 1)
+ this.castleFlags[c][1] = 8;