diff --git a/game.py b/game.py index 4303fc8..1b5d153 100644 --- a/game.py +++ b/game.py @@ -40,6 +40,7 @@ for x in range(PLAY_HEIGHT//64): for y in range(PLAY_HEIGHT//64): grass = Grass(x,y) cells[x].append(grass) +print( cells ) #Losowanie domków i dodawanie je do mapy home_len = home_amount @@ -67,10 +68,10 @@ while(1): all_sprites.update() all_sprites.draw(GAMEWINDOW) - + #generowanie smieci for house in all_sprites: - if( type(house) == House): + if( type(house) == House ): house.generate_rubbish() #house.check_rubbish_status() diff --git a/sprites/house.py b/sprites/house.py index ad7f6a0..b3f676d 100644 --- a/sprites/house.py +++ b/sprites/house.py @@ -22,13 +22,13 @@ class House(Cell): self.rubbish[thrash_type] = self.rubbish[thrash_type] + 1 if( self.rubbish[PLASTIC] > self.max_plastic ): - self.image = pygame.image.load("images/house_blue.png") + self.image = pygame.image.load("images/house_plastic.png") print("PLASTIC alert") if( self.rubbish[GLASS] > self.max_glass ): - self.image = pygame.image.load("images/house_green.png") + self.image = pygame.image.load("images/house_glass.png") print("GLASS alert") if( self.rubbish[METAL] > self.max_metal ): - self.image = pygame.image.load("images/house_yellow.png") + self.image = pygame.image.load("images/house_metal.png") print("METAL alert") def check_rubbish_status(self):