- if (move.vanish.length == 2) {
- // Was opponent king swapped?
- if (move.vanish[1].p == V.KING)
- this.kingPos[this.turn] = [move.appear[1].x, move.appear[1].y];
- }
+ // Was opponent king swapped?
+ if (move.vanish.length == 2 && move.vanish[1].p == V.KING)
+ this.kingPos[this.turn] = [move.appear[1].x, move.appear[1].y];