another merge

This commit is contained in:
s1202077 2019-03-19 18:37:48 +01:00
commit 219f523dac
2 changed files with 6 additions and 5 deletions

View File

@ -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()

View File

@ -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):