From a5706c0be5778b911b061deca501271fc2bf2c07 Mon Sep 17 00:00:00 2001 From: Robby Zambito Date: Fri, 21 Jan 2022 17:49:09 -0500 Subject: 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. --- include/othello.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include') 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); -- cgit v1.2.3