diff options
author | Robby Zambito <contact@robbyzambito.me> | 2021-08-31 20:57:38 -0400 |
---|---|---|
committer | Robby Zambito <contact@robbyzambito.me> | 2021-08-31 20:57:38 -0400 |
commit | a3d620344709d17a713fbc6b1576e0467bccf974 (patch) | |
tree | 6a62b7dd76bfb4e789d4f5a0fa86c1989c955a2b /include | |
parent | 9dbde8b96e07fb24cb3957308b7f7337867ae301 (diff) |
Added comments to function definitions.
Diffstat (limited to 'include')
-rw-r--r-- | include/othello.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/othello.h b/include/othello.h index 9c052dc..84827ec 100644 --- a/include/othello.h +++ b/include/othello.h @@ -29,11 +29,22 @@ struct move { int col; }; +// Set a board to a new game state. void initialize_board(enum player_color board[8][8]); + +// True if move is valid for current_player. +// Otherwise false. bool is_valid_move(const enum player_color board[8][8], const enum player_color current_player, const struct move move); + +// True if current_player has any valid moves. +// Otherwise false. bool has_valid_moves(const enum player_color board[8][8], const enum player_color current_player); + +// Plays a game to completion, starting with board. enum player_color game_loop(enum player_color board[8][8]); + +// Prints the current state of the board, including coordinates in the margins. void print_board(const enum player_color board[8][8]); |