a591405db2563216aba4452a265b9d895fdc9801
2 * =====================================================================================
6 * Description: Header for othello board handling functions
9 * Created: 25/04/2017 15:16:37
13 * Author: Jerome Benoit (fraggle), jerome.benoit@piment-noir.org
14 * Organization: Piment Noir
16 * =====================================================================================
22 #include "constants.h"
25 /* TODO: must be used to replace the explicit pawns 2D array */
27 unsigned int pawns
[board_size
][board_size
];
30 /* linked list of played shots */
31 struct shots_history_list_s
{
32 struct list_head list
;
33 unsigned int*** pawn_array_member
; /* pointer to a cell of the pawns 2D array */
34 /* struct* pawns_s pawn */
37 /* linked list of can play shots */
38 struct shots_exploration_s
{
39 struct list_head list
;
45 unsigned int current_player(unsigned int round_count
);
46 unsigned int eval_winner(unsigned int nb_white
, unsigned int nb_black
);
48 int** init_pawns(unsigned int pawn_array
[board_size
][board_size
]);
49 unsigned int get_box_value(int y
, int x
, unsigned int pawn_array
[board_size
][board_size
]);
50 int** set_pawn(int y
, int x
, unsigned int type
, unsigned int pawn_array
[board_size
][board_size
]);
52 bool is_valid_input(int y
, int x
, unsigned int pawn_array
[board_size
][board_size
]);
53 bool is_box_type(int y
, int x
, unsigned int pawn_array
[board_size
][board_size
], unsigned int type
);
54 bool is_board_full(unsigned int pawn_array
[board_size
][board_size
]);
56 unsigned int count_pawn_type(unsigned int pawn_array
[board_size
][board_size
], unsigned int type
);
58 #endif /* OTHELLO_H */