Fix an off-by-one on the pawn 2D array indexes.
[Project_algorithmic_C.git] / lib / othello.h
index 7123697e655f5a41c1e30666afd39fefab951ddc..62fb04a1a8aac5a2fe37ccc7fb00d3ae36495813 100644 (file)
 #define OTHELLO_H
 
 #include "constants.h"
+#include "list.h"
 
-int pawn[board_size][board_size] = {
-    {0, 0}
+struct shots_list {
+    struct list_head list;
+    unsigned int*** pawn_array_member;
 };
 
+unsigned int current_player(unsigned int round_count);
+
+int** init_pawns(unsigned int pawn_array[board_size][board_size]);
+
+bool is_valid_input(int y, int x, unsigned int pawn_array[board_size][board_size]);
+bool is_box_type(int y, int x, unsigned int pawn_array[board_size][board_size], unsigned int type);
+bool is_board_full(unsigned int pawn_array[board_size][board_size]);
+unsigned int get_box_value(int y, int x, unsigned int pawn_array[board_size][board_size]);
+int** set_pawn(int y, int x, unsigned int type, unsigned int pawn_array[board_size][board_size]);
+
+unsigned int count_pawn_type(unsigned int pawn_array[board_size][board_size], unsigned int type);
+
 #endif /* OTHELLO_H */