C0d3Crush / go

1 stars 0 forks source link

Fix: Handling of Pass & Invalid Moves #7

Open C0d3Crush opened 1 month ago

C0d3Crush commented 1 month ago

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' 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

Desired Behavior

  1. Improve Pass Handling:
    • Ensure passes are handled gracefully without causing the game to continue incorrectly.