AI2020_Project/models/garbageDump.py

28 lines
682 B
Python

class Dump():
def __init__(self):
self.coor = 0
self.plastic = 0
self.paper = 0
self.metal = 0
self.cardboard = 0
self.glass = 0
def addGarbage(self, i):
if i == 'plastic':
self.plastic += 1
return True
elif i == 'paper':
self.paper += 1
return True
elif i == 'metal':
self.metal += 1
return True
elif i == 'cardboard':
self.cardboard += 1
return True
elif i == 'glass':
self.glass += 1
return True
else:
return False