- }
-
- // Did we explode opponent king ?
- if (Math.abs(this.kingPos[oppCol][0]-move.end.x) <= 1
- && Math.abs(this.kingPos[oppCol][1]-move.end.y) <= 1)
- {
- this.kingPos[oppCol] = [-1,-1];
- this.castleFlags[oppCol] = [false,false];
- }
- else
- {
- // Now check if opponent init rook(s) exploded
- if (Math.abs(move.end.x-oppFirstRank) <= 1)