summaryrefslogtreecommitdiff
path: root/include/othello.h
diff options
context:
space:
mode:
authorRobby Zambito <contact@robbyzambito.me>2022-01-18 22:37:04 -0500
committerRobby Zambito <contact@robbyzambito.me>2022-01-18 22:37:04 -0500
commitc5c54396bdf8ef14c17a0bc5b8f0fda74aa958cf (patch)
tree55354c468cb60d52578f70b892f3f8ac885d6c2c /include/othello.h
parent59627145631f254191ce1b9de561c8ba0ddc889e (diff)
* Made print_board accept a board to print.
* free_board should not return anything. * is_valid_move and has_valid_moves accept a board. * Implemented primitives for Scheme strategies to get the current player, and to get the board, and the validity of a move. * Removed game logic from is_valid_move. Instead simply apply the move to a temp board, and see if the move worked. * Created a very simple strategy for testing these primitives. It only hardcodes the first move, and then fails since that move is no longer valid.
Diffstat (limited to 'include/othello.h')
-rw-r--r--include/othello.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/othello.h b/include/othello.h
index 14c402b..40a36c4 100644
--- a/include/othello.h
+++ b/include/othello.h
@@ -45,14 +45,14 @@ void initialize_board(void);
enum player_color **copy_board(enum player_color **board);
// Free the specified board.
-enum player_color **free_board(enum player_color **board);
+void free_board(enum player_color **board);
// Plays a game to completion, starting with board.
enum player_color game_loop(char *player_one_strategy,
char *player_two_strategy);
// Prints the current state of the board, including coordinates in the margins.
-void print_board(void);
+void print_board(enum player_color **board);
// Returns the color of the player whose turn it is.
enum player_color get_current_player(void);