#include "labyrinth.h" #include "global.h" #include "stdio.h" #include "stdlib.h" void turn_direction_right(Direction *direction){ switch (*direction) { case N: *direction = E; break; case E: *direction = S; break; case S: *direction = W; break; case W: *direction = N; break; } } void lab_move(unsigned short *x, unsigned short *y, Direction direction){ if (direction == N){ *x = *x - 1; return; } if (direction == E){ *y = *y + 1; return; } if (direction == S){ *x = *x + 1; return; } if (direction == W){ *y = *y - 1; return; } } void set_wall(State** field, unsigned short x, unsigned short y) { field[0][0] = WALL; }