diff --git a/game.py b/game.py index 8a6cc0e..0d520b4 100644 --- a/game.py +++ b/game.py @@ -47,6 +47,13 @@ while( home_len > 0 ): cells[x][y] = House(x,y, 10, 10, 10) home_len = home_len - 1 +for trash_type in range(3): + x = random.randint(0, (PLAY_WIDTH//64)-1) + y = random.randint(0, (PLAY_WIDTH//64)-1) + if( type(cells[x][y]) == Grass ): + cells[x][y] = Landfill(x, y, trash_type) + + #Dodawanie wszystkich spritow do grupy spritow for x in range(len(cells)): for y in range(len(cells[x])): diff --git a/images/house_green.png b/images/house_glass.png similarity index 100% rename from images/house_green.png rename to images/house_glass.png diff --git a/images/house_yellow.png b/images/house_metal.png similarity index 100% rename from images/house_yellow.png rename to images/house_metal.png diff --git a/images/house_blue.png b/images/house_plastic.png similarity index 100% rename from images/house_blue.png rename to images/house_plastic.png diff --git a/to_do.txt b/to_do.txt index 26ea986..965b122 100644 --- a/to_do.txt +++ b/to_do.txt @@ -2,5 +2,5 @@ +Dodanie metody od zapełniania śmietników która updatuje się co klatkę (Jeżeli zapełnienie == 100 to zmienia się sprite i trzeba zabrać czy coś takiego) -Dodanie hudu +Wpisywanie na początku gry liczby domków --Umieszczenie na mapie wysypisk(I dodanie ich klasy) ++Umieszczenie na mapie wysypisk(I dodanie ich klasy) -W JAKI SPOSÓB MOŻNA PREZENTOWAĆ KILKA RÓŻNYCH ŚMIECI NA DOMKU? diff --git a/utils.py b/utils.py index 3021ce3..9d19304 100644 --- a/utils.py +++ b/utils.py @@ -6,6 +6,9 @@ def set_home_amount(): optlist, args = getopt.getopt(arguments, '', ['home-count=']) for o, amount in optlist: if o == '--home-count': + if int(amount) < 2: + print('Home count too low - must be higher than 2') + sys.exit(2) return int(amount) print('Missing argument: --home-count ') sys.exit(2)