blob: c7ed718dbfbd077b643920be38bbe5694018f5d8 (
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(const player_color board[8][8]);
|