food, menu, order

This commit is contained in:
Michał Szuszert 2022-03-30 18:24:32 +02:00
parent 919c4ca04c
commit 5e58b25265

View File

@ -63,6 +63,40 @@ class Chair:
surface.blit(chairImg, (self.loc[0], self.loc[1])) surface.blit(chairImg, (self.loc[0], self.loc[1]))
class Food:
def __init__(self, name, price):
self.name = name
self.price = price
def get_food(self):
return self.name, self.price
class Menu:
def __init__(self, card={}):
self.card = card
def get_menu(self):
return self.card
def add_to_card(self, dish):
self.card[str(len(self.card) + 1)] = dish
class Order(Table):
def __init__(self, status=False, table=0, dishes=[]):
self.table = table
self.dishes = dishes
self.status = status
def take_order(self, foods, table):
self.dishes.append(foods)
self.table = table.number
def deliver(self):
self.status = True
waiter = Waiter([64, 320]) waiter = Waiter([64, 320])
tables = [] tables = []
chairs = [] chairs = []