+ this.postUndo(move);
+ }
+
+ postUndo(move) {
+ if (this.turn == 'w') {
+ // Reset king positions: scan board (TODO: could be more efficient)
+ if (move.vanish.length > 0) this.scanKings();
+ // Also reset whiteMove
+ this.whiteMove = null;
+ }
+ else this.whiteMove = move.whiteMove;