commit 5e7efc95a04736a4660405c4885e70e66025ec72
parent 540f980328e54584c6876520c1d8dd0f4b064053
Author: Martin Klöckner <mjkloeckner@gmail.com>
Date: Tue, 2 Apr 2024 17:50:01 -0300
Fix game not entering `WIN` status
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tictactoe.cpp b/tictactoe.cpp
@@ -257,14 +257,15 @@ void game_check_status() {
game_status = WIN;
}
- if(game_status != WIN)
+ if(game_status != WIN) {
for(i = 0; i < 3; ++i)
for(j = 0; j < 3; ++j)
if(game_board[i][j] == ' ')
return;
- if((i == j) && (i == 3))
- game_status = DRAFT;
+ if((i == j) && (i == 3))
+ game_status = DRAFT;
+ }
}
void game_key_handler(void) {