2 * This file is licensed under the GPLv2 license
4 * Luiz Fernando N. Capitulino
5 * <lcapitulino@gmail.com>
13 #define BOARD_DEF_SIZE 8
14 #define BOARD_MAX_SIZE 16
17 enum game_piece board
[BOARD_MAX_SIZE
][BOARD_MAX_SIZE
]; /* game board */
18 int row
; /* number of rows in use */
19 int col
; /* number of columns in use */
20 int free_positions
; /* free positions in the board */
21 int balls_play1
; /* number of player 1's balls */
22 int balls_play2
; /* number of player 2's balls */
25 void board_init(struct game_board
*board
, int size
);
26 void board_draw(const struct game_board
*board
);
27 enum game_state
board_move(struct game_board
*board
,
28 const struct user_move
*move
);
29 int board_dst_is_valid(const struct game_board
*board
,
30 const struct user_move
*move
);
31 int board_src_is_valid(const struct game_board
*board
,
32 const struct user_move
*move
);