33 lines
560 B
C
33 lines
560 B
C
#include <stdio.h>
|
|
#include <string.h>
|
|
#include "maze.h"
|
|
#include <assert.h>
|
|
#include <unistd.h>
|
|
|
|
#define CHECKED_BIT 16
|
|
#define DIRECTION_BITS 15
|
|
|
|
enum direction {
|
|
NORTH = 8,
|
|
EAST = 4,
|
|
SOUTH = 2,
|
|
WEST = 1,
|
|
NONE = 0
|
|
};
|
|
|
|
int solve_maze(char* maze, int size) {
|
|
if (maze[0] == 'x') {
|
|
return 0;
|
|
}
|
|
|
|
printf("\n");
|
|
for (int y = 0; y < size; y++) {
|
|
for (int x = 0; x < size; x++) {
|
|
printf("%c", maze[size * y + x]);
|
|
}
|
|
printf("\n");
|
|
}
|
|
printf("\nend %d\n\n", size);
|
|
return 0;
|
|
}
|