Изменил(а) на 'sk1a/maze.c'

This commit is contained in:
Oleksandr Hryshchenko 2022-01-09 17:23:58 +00:00
parent e59dd0032e
commit d96eb1f63a

View File

@ -18,7 +18,7 @@ int solve_recursive(char* maze, int size, int x, int y, int down_visited, int ri
return 1;
}
if(x != size - 1 && maze[x + 1 + y * size] != 'x'){
if(x != size - 1 && maze[x + 1 + y * size] != 'x' && right_visited != 1){
return solve_recursive(maze, size, x+1, y, 0, 0);
}