Fix the handling of passes and invalid moves in the game. The current implementation allows the game loop to continue with invalid moves, which should instead print an error and stop the game.
Details
Currently, when a move is empty (such as a pass) and loaded from an SGF file, the move value is calculated as 0 - 'a'(x - 'a' and y - 'a'), resulting in a negative number. While this prevents the move from going through, the game loop continues. The desired behavior is for the game to print an error and stop for invalid moves.
Current Behavior
Pass Handling: The move is set to a negative number (0 - 'a'), preventing the move but allowing the game loop to continue.
Invalid Moves: Invalid moves do not cause the game to stop, leading to potential issues in gameplay.
Desired Behavior
Error Handling: When a move is invalid (e.g., resulting in a negative value from 0 - 'a'), the game should print an error message and stop.
Improve Pass Handling:
Ensure passes are handled gracefully without causing the game to continue incorrectly.
Summary
Fix the handling of passes and invalid moves in the game. The current implementation allows the game loop to continue with invalid moves, which should instead print an error and stop the game.
Details
Currently, when a move is empty (such as a pass) and loaded from an SGF file, the move value is calculated as
0 - 'a'
(x - 'a'
andy - 'a'
), resulting in a negative number. While this prevents the move from going through, the game loop continues. The desired behavior is for the game to print an error and stop for invalid moves.Current Behavior
0 - 'a'
), preventing the move but allowing the game loop to continue.Desired Behavior
0 - 'a'
), the game should print an error message and stop.