SZI2019SmieciarzWmi/DataModels/House.py
2019-04-23 20:48:14 +02:00

17 lines
599 B
Python

from DataModels.Cell import Cell
class House(Cell):
def __init__(self, x, y, max_rubbish, yellow=0, green=0, blue=0):
Cell.__init__(self, x, y, max_rubbish, yellow, green, blue)
def return_trash(self, collector):
self.container.yellow, self.container.green, self.container.blue = collector.container.add(
[self.container.yellow, self.container.green, self.container.blue])
self.update_image()
def is_empty(self):
if(self.container.yellow == self.container.green == self.container.blue == 0):
return True
else: return False