diff --git a/Restaurant/main.py b/Restaurant/main.py index 9fdf223..36b62bb 100644 --- a/Restaurant/main.py +++ b/Restaurant/main.py @@ -7,10 +7,11 @@ pygame.init() class Dish(object): - def __init__(self, dishName, prepTime, eatTime): + def __init__(self, dishName, prepTime, eatTime, price): self.dishName = dishName self.preparationTime = prepTime self.eatingTime = eatTime + self.price = price class Plate(object): @@ -43,15 +44,20 @@ class Client(object): self.sex = sex self.myPlate = None self.budget = budget + self.myTable = 0 #domyślnie klient nie siedzi przy żadnym stole def takePlateAndEat(self, plate): self.myPlate = plate plate.eat() + def takeASeat(self, table): + self.myTable = table class Table(object): - def __init__(self, pos): + def __init__(self, pos, capacity): self.pos = pos + self.capacity = capacity + self.clients = [] #lista gości przy danym stole def move(self, newx, newy): #metoda do ustawiania stołów poprzez podanie nowych współrzędnych self.pos[0] = newx