blob: f5d2da3dc5493028528aaa7900ec70c024148f92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#define BOARD_WIDTH 2
#define BOARD_ROW_BYTES ((BOARD_WIDTH * 2) + 1)
#define BOARD_BYTES BOARD_ROW_BYTES * BOARD_ROW_BYTES
char EMPTY = ' ';
char FORBIDDEN = ' ';
int neighbor_increments[] = {
- BOARD_ROW_BYTES,
1,
BOARD_ROW_BYTES,
- 1
};
// Board
void initialize_board(char* board);
void print_board(char* board);
// Moves
int is_allowed_placement(char* tile, int position, char* board);
int is_center_position(int position);
int place_tile(char* tile, int position, char* board);
|