Brakujące atrybuty
This commit is contained in:
parent
b48b3a0362
commit
38f40f44b0
@ -7,10 +7,11 @@ pygame.init()
|
|||||||
|
|
||||||
|
|
||||||
class Dish(object):
|
class Dish(object):
|
||||||
def __init__(self, dishName, prepTime, eatTime):
|
def __init__(self, dishName, prepTime, eatTime, price):
|
||||||
self.dishName = dishName
|
self.dishName = dishName
|
||||||
self.preparationTime = prepTime
|
self.preparationTime = prepTime
|
||||||
self.eatingTime = eatTime
|
self.eatingTime = eatTime
|
||||||
|
self.price = price
|
||||||
|
|
||||||
|
|
||||||
class Plate(object):
|
class Plate(object):
|
||||||
@ -43,15 +44,20 @@ class Client(object):
|
|||||||
self.sex = sex
|
self.sex = sex
|
||||||
self.myPlate = None
|
self.myPlate = None
|
||||||
self.budget = budget
|
self.budget = budget
|
||||||
|
self.myTable = 0 #domyślnie klient nie siedzi przy żadnym stole
|
||||||
|
|
||||||
def takePlateAndEat(self, plate):
|
def takePlateAndEat(self, plate):
|
||||||
self.myPlate = plate
|
self.myPlate = plate
|
||||||
plate.eat()
|
plate.eat()
|
||||||
|
|
||||||
|
def takeASeat(self, table):
|
||||||
|
self.myTable = table
|
||||||
|
|
||||||
class Table(object):
|
class Table(object):
|
||||||
def __init__(self, pos):
|
def __init__(self, pos, capacity):
|
||||||
self.pos = pos
|
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
|
def move(self, newx, newy): #metoda do ustawiania stołów poprzez podanie nowych współrzędnych
|
||||||
self.pos[0] = newx
|
self.pos[0] = newx
|
||||||
|
Loading…
Reference in New Issue
Block a user