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 * =====================================================================================
24 #include "constants.h"
27 /* linked list of can play shots */
29 struct list_head list
;
32 unsigned int type
; /* can be white or black or hint allowed or hint_fordidden */
35 unsigned int current_player(unsigned int round_count
);
36 unsigned int eval_winner(unsigned int nb_white
, unsigned int nb_black
);
38 void zero_pawns(unsigned int pawn_array
[board_size
][board_size
]);
39 void init_pawns(unsigned int pawn_array
[board_size
][board_size
]);
40 unsigned int get_box_value(int y
, int x
, unsigned int pawn_array
[board_size
][board_size
]);
41 void set_pawn(int y
, int x
, unsigned int type
, unsigned int pawn_array
[board_size
][board_size
]);
43 bool is_box_type(int y
, int x
, unsigned int pawn_array
[board_size
][board_size
], unsigned int type
);
44 bool is_board_full(unsigned int pawn_array
[board_size
][board_size
]);
46 unsigned int count_pawns_type(unsigned int pawn_array
[board_size
][board_size
], unsigned int type
);
48 unsigned int valid_shot(int y
, int x
, unsigned int current_player
, unsigned int pawn_array
[board_size
][board_size
]);
50 #endif /* OTHELLO_H */