omijanie przeszkody w generowaniu wspolrzednych domow

This commit is contained in:
Adam Osiowy 2020-04-06 01:54:08 +02:00
parent 845642c3c8
commit 843de1beff
11 changed files with 4 additions and 0 deletions

View File

@ -191,6 +191,10 @@ def generujWspolrzedneDomow(ilosc_domow):
y = random.randrange(15)
wspolrzedne_domu.append(x)
wspolrzedne_domu.append(y)
if wspolrzedne_domu[0] >= 6 and wspolrzedne_domu[0] <= 7 and wspolrzedne_domu[1] >= 10 and wspolrzedne_domu[1] <= 11:
continue
if wspolrzedne_domu not in wspolrzedne_domow:
wspolrzedne_domow.append(wspolrzedne_domu)
r = r + 1

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB