diff options
Diffstat (limited to 'include/othello_move.h')
-rw-r--r-- | include/othello_move.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/othello_move.h b/include/othello_move.h index 281cb9b..2e2974b 100644 --- a/include/othello_move.h +++ b/include/othello_move.h @@ -30,6 +30,9 @@ struct move get_scm_move(char *strategy_path); bool is_valid_move(enum player_color **board, const enum player_color current_player, const struct move move); +SCM scm_is_valid_move(SCM board, SCM current_player, SCM move); + +SCM scm_valid_moves(SCM scm_board, SCM player); // True if current_player has any valid moves. // Otherwise false. @@ -39,3 +42,8 @@ bool has_valid_moves(enum player_color **board, /* Returns true if the move was valid */ bool apply_move(enum player_color **board, enum player_color current_player, struct move move); +// Does not actually modify the current board state. Returns a new board with +// the move applied. If the move was not valid, an empty list (nil) is returned. +SCM scm_apply_move(SCM move, SCM board, SCM current_player); + +struct move scm_move_to_c_move(SCM scm_move); |