diff options
author | Robby Zambito <contact@robbyzambito.me> | 2022-01-21 17:49:09 -0500 |
---|---|---|
committer | Robby Zambito <contact@robbyzambito.me> | 2022-01-21 17:49:09 -0500 |
commit | a5706c0be5778b911b061deca501271fc2bf2c07 (patch) | |
tree | 1087eb740715e692820ff1e275cf61a7ca1b0ea8 /include | |
parent | 199b2ff1b66bf2e12c9bf0b55a895a5555cc52f7 (diff) |
Add command line argument to print the final board as a scheme object
This could be useful to create a machine learning AI, which uses the
final board for training.
Also bubble up the final score and present it at the end of the game.
Diffstat (limited to 'include')
-rw-r--r-- | include/othello.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/othello.h b/include/othello.h index e46c13e..88b8be2 100644 --- a/include/othello.h +++ b/include/othello.h @@ -35,10 +35,10 @@ struct move { int col; }; - // Plays a game to completion, starting with board. enum player_color game_loop(char *player_one_strategy, - char *player_two_strategy); + char *player_two_strategy, int *white_score, + int *black_score); // Returns the color of the player whose turn it is. enum player_color get_current_player(void); @@ -47,7 +47,6 @@ SCM scm_get_current_player(void); enum player_color scm_player_to_c_player(SCM player); enum player_color get_winner(enum player_color **board, - enum player_color current_player, - int *white_score, + enum player_color current_player, int *white_score, int *black_score); SCM scm_get_winner(SCM board, SCM current_player); |