--- deliantra/server/random_maps/snake.C 2006/09/14 22:34:02 1.3 +++ deliantra/server/random_maps/snake.C 2007/01/27 02:19:37 1.6 @@ -1,3 +1,4 @@ + /* peterm@langmuir.eecs.berkeley.edu: this function generates a random snake-type layout. @@ -43,9 +44,9 @@ /* decide snake orientation--vertical or horizontal , and make the walls and place the doors. */ - if (RANDOM () % 2) + if (rndm (2)) { /* vertical orientation */ - int n_walls = RANDOM () % ((xsize - 5) / 3) + 1; + int n_walls = rndm (xsize - 5) / 3 + 1; int spacing = xsize / (n_walls + 1); int orientation = 1; @@ -72,7 +73,7 @@ } else { /* horizontal orientation */ - int n_walls = RANDOM () % ((ysize - 5) / 3) + 1; + int n_walls = rndm (ysize - 5) / 3 + 1; int spacing = ysize / (n_walls + 1); int orientation = 1; @@ -99,7 +100,7 @@ } /* place the exit up/down */ - if (RANDOM () % 2) + if (rndm (2)) { maze[1][1] = '<'; maze[xsize - 2][ysize - 2] = '>';