Commit | Line | Data |
---|---|---|
4ddf6f1a JB |
1 | /* |
2 | * ===================================================================================== | |
3 | * | |
4 | * Filename: othello.h | |
5 | * | |
6 | * Description: Header for othello board handling functions | |
7 | * | |
8 | * Version: 1.0 | |
9 | * Created: 25/04/2017 15:16:37 | |
10 | * Revision: none | |
11 | * Compiler: gcc | |
12 | * | |
13 | * Author: Jerome Benoit (fraggle), jerome.benoit@piment-noir.org | |
14 | * Organization: Piment Noir | |
15 | * | |
16 | * ===================================================================================== | |
17 | */ | |
18 | ||
19 | #ifndef OTHELLO_H | |
20 | #define OTHELLO_H | |
21 | ||
2e5c1894 | 22 | #include "constants.h" |
54f1c58c | 23 | #include "list.h" |
2e5c1894 | 24 | |
54f1c58c JB |
25 | struct shots_list { |
26 | struct list_head list; | |
27 | unsigned int*** pawn_array_member; | |
28 | }; | |
74e2b93b JB |
29 | |
30 | unsigned int current_player(unsigned int round_count); | |
31 | ||
32 | int** init_pawns(unsigned int pawn_array[board_size][board_size]); | |
33 | ||
54f1c58c | 34 | bool is_valid_input(int y, int x, unsigned int pawn_array[board_size][board_size]); |
74e2b93b | 35 | bool is_box_type(int y, int x, unsigned int pawn_array[board_size][board_size], unsigned int type); |
54f1c58c | 36 | bool is_board_full(unsigned int pawn_array[board_size][board_size]); |
74e2b93b JB |
37 | unsigned int get_box_value(int y, int x, unsigned int pawn_array[board_size][board_size]); |
38 | int** set_pawn(int y, int x, unsigned int type, unsigned int pawn_array[board_size][board_size]); | |
39 | ||
40 | unsigned int count_pawn_type(unsigned int pawn_array[board_size][board_size], unsigned int type); | |
2e5c1894 | 41 | |
4ddf6f1a | 42 | #endif /* OTHELLO_H */ |