kings' check
Opened this issue · 3 comments
viperscape commented
track kings' check before any move is validated
this will likely require brute force checking of each piece for a check before any move completes.
this also includes the king potentially moving in to check, or a piece incidentally placing king in check
viperscape commented
this might require a state tracker for the completed move (piece from -> to, plus potential capture/upgrade) and to be unrolled when a check is revealed for that active player's king, thus invalidating the move.
viperscape commented
idea: copy the game-table arrays, work off the dupe, if success reset main to dupe, else drop dupe
viperscape commented
need to implement check-mate, check and board rollback is all completed