2023-05-05 02:56:22 +02:00
|
|
|
from src.obj.Object import Object
|
|
|
|
|
|
|
|
|
|
|
|
class Table(Object):
|
2023-05-14 14:23:37 +02:00
|
|
|
def __init__(self, position, orientation, square_size, screen_size, current_role=0):
|
|
|
|
super().__init__("table", position, orientation, square_size, screen_size)
|
2023-05-05 02:56:22 +02:00
|
|
|
self.roles = ["table", "order", "wait", "done"]
|
|
|
|
self.current_role = current_role
|
|
|
|
self.change_role(self.roles[self.current_role])
|
|
|
|
|
|
|
|
def next_role(self, waiter):
|
|
|
|
if waiter.agent_role == "waiter":
|
|
|
|
self.current_role = (self.current_role + 1) % 4
|
|
|
|
self.change_role(self.roles[self.current_role])
|