+ updateVariables(move)
+ {
+ super.updateVariables(move); //standard king
+ const piece = this.getPiece(move.start.x,move.start.y);
+ const c = this.getColor(move.start.x,move.start.y);
+ // "l" = Alice king
+ if (piece == "l")
+ {
+ this.kingPos[c][0] = move.appear[0].x;
+ this.kingPos[c][1] = move.appear[0].y;
+ this.castleFlags[c] = [false,false];
+ }
+ }
+
+ unupdateVariables(move)
+ {
+ super.unupdateVariables(move);
+ const c = this.getColor(move.start.x,move.start.y);
+ if (this.getPiece(move.start.x,move.start.y) == "l")
+ this.kingPos[c] = [move.start.x, move.start.y];
+ }
+