-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;
+static 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;