diff --git a/src/main/c/labyrinth.c b/src/main/c/labyrinth.c index c0aa3ed..6acd557 100644 --- a/src/main/c/labyrinth.c +++ b/src/main/c/labyrinth.c @@ -64,16 +64,7 @@ short lab_can_move(Field_State** field, unsigned short x, unsigned short y, Dire if (y >= len_y){ return 1; } - if (direction == N && field[x][y] == WALL){ - return 1; - } - if (direction == E && field[x][y] == WALL){ - return 1; - } - if (direction == S && field[x][y] == WALL){ - return 1; - } - if (direction == W && field[x][y] == WALL){ + if (field[x][y] == WALL){ return 1; } diff --git a/src/test/c/test_labyrinth.c b/src/test/c/test_labyrinth.c index 4a60303..5cde2e1 100644 --- a/src/test/c/test_labyrinth.c +++ b/src/test/c/test_labyrinth.c @@ -607,11 +607,3 @@ void test_lab_can_move_at_1_1_direction_W_target_WALL_expected_1(void) free(field); } - - - - - - - -