From 5e58b25265f7ff646de0caf6038c33c8266b613c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szuszert?= Date: Wed, 30 Mar 2022 18:24:32 +0200 Subject: [PATCH] food, menu, order --- tiles.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tiles.py b/tiles.py index e370e7b..521dd74 100644 --- a/tiles.py +++ b/tiles.py @@ -63,6 +63,40 @@ class Chair: 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]) tables = [] chairs = []