+
+bool is_valid_input(int y, int x, unsigned int pawn_array[board_size][board_size]) {
+
+ /* FIXME: separate the tests to permit to print explicit error messages */
+ if ((y > 0 && y < board_size + 1) && \
+ (x > 0 && x < board_size + 1) && \
+ is_box_type(y, x, pawn_array, empty)) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+bool is_board_full(unsigned int pawn_array[board_size][board_size]) {
+
+ /* an alternate method is to test the round count vs. 60 */
+ for (unsigned int i = 1; i <= board_size; i++) {
+ for (unsigned int j = 1; j <= board_size; j++) {
+ if (is_box_type(i, j, pawn_array , empty)) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+unsigned int eval_winner(unsigned int nb_white, unsigned int nb_black) {
+
+ if (nb_white > nb_black) {
+ return player_two;
+ } else if (nb_white < nb_black) {
+ return player_one;
+ } else {
+ return 0;
+ }
+}
+
+void direction_to_coordinates(unsigned int direction, int* start_y, int* start_x) {
+
+ if (direction == north) {
+ *start_y = *start_y - 1;
+ } else if (direction == north_east) {
+ *start_y = *start_y - 1;
+ *start_x = *start_x + 1;
+ } else if (direction == east) {
+ *start_x = *start_x + 1;
+ } else if (direction == south_east) {
+ *start_y = *start_y + 1;
+ *start_x = *start_x + 1;
+ } else if (direction == south) {
+ *start_y = *start_y + 1;
+ } else if (direction == south_west) {
+ *start_y = *start_y + 1;
+ *start_x = *start_x - 1;
+ } else if (direction == west) {
+ *start_x = *start_x - 1;
+ } else if (direction == north_west) {
+ *start_y = *start_y - 1;
+ *start_x = *start_x - 1;
+ }
+}
+
+bool explore(int y, int x, int direction) {
+
+}