blob: ed25b6d661c0f1f282d2fb80d56c0e80c08f607d (
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);
player_color game_loop(player_color board[8][8]);
void print_board(const player_color board[8][8]);
|