/* peterm@langmuir.eecs.berkeley.edu: this function generates a random snake-type layout. input: xsize, ysize; output: a char** array with # and . for closed and open respectively. a char value of 0 represents a blank space: a '#' is a wall. */ #include #include #include char **make_snake_layout(int xsize, int ysize,int options) { int i,j; /* allocate that array, set it up */ char **maze = (char **)calloc(sizeof(char*),xsize); for(i=0;i