prvy
This commit is contained in:
parent
29107acfc3
commit
7bcfc31c4c
BIN
sk1a/main.o
BIN
sk1a/main.o
Binary file not shown.
19
sk1a/maze.c
19
sk1a/maze.c
@ -4,5 +4,22 @@
|
||||
#include <assert.h>
|
||||
|
||||
int solve_maze(char* maze,int size) {
|
||||
return 0;
|
||||
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;
|
||||
}
|
||||
|
BIN
sk1a/maze.o
BIN
sk1a/maze.o
Binary file not shown.
BIN
sk1a/program
BIN
sk1a/program
Binary file not shown.
Loading…
Reference in New Issue
Block a user