#include #include #include "maze.h" #include int solve_maze(char* maze,int size) { int i = 0; while(i != size*size-1){ if (maze[i + 1] == ' ' && i != size - 1) { maze[i + 1] = '*'; i++; } else if (maze[i + size] == ' ' && i != size - 1) { maze[i + size] = '*'; i = i + size; } else if (maze[i - 1] == ' ' && i != 0) { maze[i - 1] = '*'; i--; } else if (maze[i - size] == ' ' && i > size) { maze[i - size] = '*'; i = i - size; } } return 1; }