export every turn to save partial game

This commit is contained in:
Hayden Johnson 2026-02-19 21:13:31 -08:00
parent cdbe614e22
commit 6fe11226d0

View file

@ -40,8 +40,6 @@ main :: proc() {
} }
} }
// Create game // Create game
game: Game game: Game
if len(os.args) > 1 { if len(os.args) > 1 {
@ -63,9 +61,9 @@ main :: proc() {
for winner == -1 { for winner == -1 {
addScores(&game) addScores(&game)
updatePhasesByScores(&game) updatePhasesByScores(&game)
// fmt.println(game)
printGame(&game) printGame(&game)
winner = checkWinner(&game) winner = checkWinner(&game)
exportGame(&game, "game.csv")
} }
// Print winner and export game // Print winner and export game
@ -74,5 +72,4 @@ main :: proc() {
game.names[winner], game.names[winner],
getScore(&game, winner) getScore(&game, winner)
) )
exportGame(&game, "game.csv")
} }