diff options
Diffstat (limited to 'include/othello.h')
-rw-r--r-- | include/othello.h | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/include/othello.h b/include/othello.h index 40a36c4..e46c13e 100644 --- a/include/othello.h +++ b/include/othello.h @@ -20,6 +20,7 @@ #pragma once +#include <libguile.h> #include <stdbool.h> #include <stdio.h> @@ -34,30 +35,19 @@ struct move { int col; }; -// Function pointers for each players move function -extern struct move (*player_one_get_move)(void); -extern struct move (*player_two_get_move)(void); - -// Set a board to a new game state. -void initialize_board(void); - -// Copy the specified board. It must be freed by the caller. -enum player_color **copy_board(enum player_color **board); - -// Free the specified 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(enum player_color **board); - // Returns the color of the player whose turn it is. enum player_color get_current_player(void); +SCM scm_get_current_player(void); -// Returns the current board. -enum player_color **get_board(void); +enum player_color scm_player_to_c_player(SCM player); -enum player_color get_winner(void); +enum player_color get_winner(enum player_color **board, + enum player_color current_player, + int *white_score, + int *black_score); +SCM scm_get_winner(SCM board, SCM current_player); |