automatyczny_kelner/agent.py
2023-06-08 02:28:59 +02:00

26 lines
775 B
Python

import random
from termcolor import colored
from src.Engine import Engine
from src.obj.Waiter import Waiter
from src.obj.Kitchen import Kitchen
from src.controller.LayoutController import LayoutController
from src.controller.ImageController import ImageController
print(colored("Initialization...", "green"))
SCREEN_SIZE = [800, 800]
SQUARE_SIZE = 80
SLEEP_DURATION = 0.125
COUNT_OF_OBJECTS = 25
store = ImageController(SQUARE_SIZE)
waiter = Waiter([0, 0], 0, SQUARE_SIZE, SCREEN_SIZE, store)
kitchen = Kitchen([0, 0], 0, SQUARE_SIZE, SCREEN_SIZE, store)
engine = Engine(SCREEN_SIZE, SQUARE_SIZE, kitchen, waiter, SLEEP_DURATION)
layout = LayoutController(engine, store).create_and_subscribe(COUNT_OF_OBJECTS)
print(colored("Starting model...", "green"))
engine.loop()