Closed Drempel3387 closed 1 year ago
The kings starting position was kept track of and then it was modified to match the ending position for each move in the legal moves list. Only then, the check was done to see if the king was in check, this way, we can properly discard of any illegal king moves.
https://github.com/Drempel3387/chessGame/blob/76d0a158dda1276e2edbb8f000d0f95ed94b8806/src/chess/engine/Pieces/King.java#L35