Code:
#include <stdio.h>
#include <stdlib.h>
void printMaze( const char maze[][12] ){
int i, j;
system("cls");
for( i = 0 ; i < 12 ; i++ )
for( j = 0 ; j < 12 ; j++ ){
printf("%c", maze[i][j] );
if( j == 11 )
putchar('\n');
}
}
void mazeTraverse( char maze[][12], int row, int col ){
// this function is suppose to make it's way through
// maze. If you follow the "wall" to your right you will
// eventually make your way through the maze.
// I just haven't figured out an algorithm :(
}
int main(void){
const char maze[12][12]= {
{ '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#' },
{ '#', '.', '.', '.', '#', '.', '.', '.', '.', '.', '.', '#' },
{ '.', '.', '#', '.', '#', '.', '#', '#', '#', '#', '.', '#' },
{ '#', '#', '#', '.', '#', '.', '.', '.', '.', '#', '.', '#' },
{ '#', '.', '.', '.', '.', '#', '#', '#', '.', '#', '.', '.' },
{ '#', '#', '#', '#', '.', '#', '.', '#', '.', '#', '.', '#' },
{ '#', '.', '.', '#', '.', '#', '.', '#', '.', '#', '.', '#' },
{ '#', '#', '.', '#', '.', '#', '.', '#', '.', '#', '.', '#' },
{ '#', '.', '.', '.', '.', '.', '.', '.', '.', '#', '.', '#' },
{ '#', '#', '#', '#', '#', '#', '.', '#', '#', '#', '.', '#' },
{ '#', '.', '.', '.', '.', '.', '.', '#', '.', '.', '.', '#' },
{ '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#' }
};
mazeTraverse( maze, 2, 0 );
return 0;
}