summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRobby Zambito <contact@robbyzambito.me>2022-01-17 17:58:28 -0500
committerRobby Zambito <contact@robbyzambito.me>2022-01-17 17:58:28 -0500
commit59627145631f254191ce1b9de561c8ba0ddc889e (patch)
treefe6c45083da7ce34bb93f67fe22bf6877c47b918 /include
parent6a9badff9bfbbdd7f54f018d3117c1778ecaa74e (diff)
Successfully read a move from scheme
Also was able to print the current board from scheme, so we should be able to do basic analysis at least. Should add more primitives for use from scheme.
Diffstat (limited to 'include')
-rw-r--r--include/othello.h10
-rw-r--r--include/othello_move.h2
2 files changed, 9 insertions, 3 deletions
diff --git a/include/othello.h b/include/othello.h
index de4f846..14c402b 100644
--- a/include/othello.h
+++ b/include/othello.h
@@ -41,9 +41,15 @@ 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.
+enum player_color **free_board(enum player_color **board);
+
// Plays a game to completion, starting with board.
-enum player_color game_loop(FILE *player_one_strategy,
- FILE *player_two_strategy);
+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);
diff --git a/include/othello_move.h b/include/othello_move.h
index 377a27f..0c3716e 100644
--- a/include/othello_move.h
+++ b/include/othello_move.h
@@ -23,7 +23,7 @@
#include "othello.h"
struct move prompt_get_move(enum player_color current_player);
-struct move get_scm_move(FILE *strategy);
+struct move get_scm_move(char *strategy_path);
// True if move is valid for current_player.
// Otherwise false.