… | |
… | |
20 | * |
20 | * |
21 | * The authors can be reached via e-mail to <support@deliantra.net> |
21 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | */ |
22 | */ |
23 | |
23 | |
24 | /* peterm@langmuir.eecs.berkeley.edu: this function generates a random |
24 | /* peterm@langmuir.eecs.berkeley.edu: this function generates a random |
25 | snake-type layout. |
25 | snake-type maze. |
26 | |
26 | |
27 | input: xsize, ysize; |
27 | input: xsize, ysize; |
28 | output: a char** array with # and . for closed and open respectively. |
28 | output: a char** array with # and . for closed and open respectively. |
29 | |
29 | |
30 | a char value of 0 represents a blank space: a '#' is |
30 | a char value of 0 represents a blank space: a '#' is |
… | |
… | |
35 | #include <global.h> |
35 | #include <global.h> |
36 | #include "random_map.h" |
36 | #include "random_map.h" |
37 | #include "rproto.h" |
37 | #include "rproto.h" |
38 | |
38 | |
39 | void |
39 | void |
40 | make_snake_layout (Layout &maze, int options) |
40 | make_snake_layout (layout &maze, int options) |
41 | { |
41 | { |
42 | int i, j; |
42 | int i, j; |
43 | |
43 | |
44 | maze.clear (); |
44 | maze.clear (); |
45 | maze.border (); |
45 | maze.border (); |