summaryrefslogtreecommitdiff
path: root/include/othello.h
blob: aed73027b70a71ad8d46e05d41981d59b460e1e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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]);