Dodanie klas dania i talerza
This commit is contained in:
parent
bea6f828fe
commit
81a86d7657
@ -4,11 +4,25 @@ import time
|
||||
|
||||
pygame.init()
|
||||
|
||||
class Dish(object):
|
||||
def __init__(self, dishName, prepTime):
|
||||
self.dishName = dishName
|
||||
self.preparationTime = prepTime
|
||||
|
||||
class Plate(object):
|
||||
def __init__(self, dish):
|
||||
self.dishName = dish.dishName
|
||||
self.isEmpty = False
|
||||
self.preparationTime = dish.preparationTime
|
||||
|
||||
def eat(self):
|
||||
self.isEmpty = True #zjadanie dania jest oznaczeniem talerza jako pusty (metoda będzie wywoływana przez klienta)
|
||||
|
||||
class Table(object):
|
||||
def __init__(self, pos):
|
||||
self.pos = pos
|
||||
|
||||
def move(self, newx, newy):
|
||||
def move(self, newx, newy): #metoda do ustawiania stołów poprzez podanie nowych współrzędnych
|
||||
self.pos[0] = newx
|
||||
self.pos[1] = newy
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user