aboutsummaryrefslogtreecommitdiff
path: root/src/board.h
blob: 442b03d7b237e82467407b771a90732bb112e595 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#define TILE_SIZE 5
#define BOARD_WIDTH 6
#define BOARD_BYTES TILE_SIZE * (BOARD_WIDTH * BOARD_WIDTH)

int direction_increments[] = {
  - TILE_SIZE * BOARD_WIDTH + 2,
    TILE_SIZE               + 2,
    TILE_SIZE * BOARD_WIDTH - 2,
  - TILE_SIZE               - 2
};

// Board
void initialize_board(char* board);

void print_board(char* board);

// Moves
int check_allowed_tile(char* tile, int position, char* board);

void place_tile(char* tile, int position, char* board);