ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/random_maps/snake.C
(Generate patch)

Comparing deliantra/server/random_maps/snake.C (file contents):
Revision 1.4 by root, Sun Dec 31 19:02:24 2006 UTC vs.
Revision 1.5 by root, Thu Jan 18 19:42:10 2007 UTC

42 return maze; 42 return maze;
43 43
44 /* decide snake orientation--vertical or horizontal , and 44 /* decide snake orientation--vertical or horizontal , and
45 make the walls and place the doors. */ 45 make the walls and place the doors. */
46 46
47 if (RANDOM () % 2) 47 if (rndm (2))
48 { /* vertical orientation */ 48 { /* vertical orientation */
49 int n_walls = RANDOM () % ((xsize - 5) / 3) + 1; 49 int n_walls = RANDOM () % ((xsize - 5) / 3) + 1;
50 int spacing = xsize / (n_walls + 1); 50 int spacing = xsize / (n_walls + 1);
51 int orientation = 1; 51 int orientation = 1;
52 52
98 orientation ^= 1; /* toggle the value of orientation */ 98 orientation ^= 1; /* toggle the value of orientation */
99 } 99 }
100 } 100 }
101 101
102 /* place the exit up/down */ 102 /* place the exit up/down */
103 if (RANDOM () % 2) 103 if (rndm (2))
104 { 104 {
105 maze[1][1] = '<'; 105 maze[1][1] = '<';
106 maze[xsize - 2][ysize - 2] = '>'; 106 maze[xsize - 2][ysize - 2] = '>';
107 } 107 }
108 else 108 else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines