diff options
author | Robby Zambito <contact@robbyzambito.me> | 2021-07-25 23:45:33 -0400 |
---|---|---|
committer | Robby Zambito <contact@robbyzambito.me> | 2021-07-25 23:45:33 -0400 |
commit | babc796fdbc3f571c18c841a33d0af37ea768dca (patch) | |
tree | b46dec93772e6bc0027c4dd43a82825ba8fd66cc /include |
Initial commit
Diffstat (limited to 'include')
-rw-r--r-- | include/othello.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/othello.h b/include/othello.h new file mode 100644 index 0000000..aed7302 --- /dev/null +++ b/include/othello.h @@ -0,0 +1,19 @@ +#include <stdbool.h> + +typedef char player_color; +#define EMPTY (player_color)'*' +#define WHITE (player_color)'w' +#define BLACK (player_color)'b' + +struct move { + int row; + int col; +}; + +void initialize_board(player_color board[8][8]); +bool is_valid_move(const player_color board[8][8], + const player_color current_player, const struct move move); +bool has_valid_moves(const player_color board[8][8], + const player_color current_player); +char game_loop(player_color board[8][8]); +void print_board(player_color board[8][8]); |