Currently, the chess engine allows a side to keep playing any move, even if its king is in check. This should not be allowed. Instead, the side should only allow moves which move its king out of check. If there are no such moves, the game ends in checkmate.
Currently, the chess engine allows a side to keep playing any move, even if its king is in check. This should not be allowed. Instead, the side should only allow moves which move its king out of check. If there are no such moves, the game ends in checkmate.