mirror of
https://github.com/Steffo99/iiiiil-gioco.git
synced 2024-11-22 07:54:21 +00:00
Impedito la creazione di stanze lungo i bordi.
This commit is contained in:
parent
55c5bae030
commit
065215ab27
1 changed files with 2 additions and 2 deletions
4
main.cpp
4
main.cpp
|
@ -124,8 +124,8 @@ void generate(char map[X_MAX][Y_MAX])
|
|||
{
|
||||
int size_x = rand() % ROOM_SIZE + 1;
|
||||
int size_y = rand() % ROOM_SIZE + 1;
|
||||
int start_x = rand() % (X_MAX - size_x);
|
||||
int start_y = rand() % (Y_MAX - size_y);
|
||||
int start_x = rand() % (X_MAX - size_x - 2) + 1;
|
||||
int start_y = rand() % (Y_MAX - size_y - 2) + 1;
|
||||
room(map, start_x, start_y, start_x + size_x, start_y + size_y);
|
||||
if(r > 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue