This commit is contained in:
Jeremi Lisek 2022-03-25 09:48:42 +01:00
parent 543b1898a9
commit 41729163f1
3 changed files with 22 additions and 4 deletions

View File

@ -5,3 +5,4 @@ class CATEGORY(Enum):
PIZZA = 1 PIZZA = 1
PASTA = 2 PASTA = 2
EGG = 3 EGG = 3
UNKNOWN = 4

View File

@ -1,3 +1,4 @@
from data.CATEGORY import CATEGORY
from data.Item import Item from data.Item import Item
from data.Order import Order from data.Order import Order
@ -14,3 +15,18 @@ class Game:
self.agentHandId = agentHandId self.agentHandId = agentHandId
self.orderStock = orderStock self.orderStock = orderStock
self.orderList = orderList self.orderList = orderList
def move(self, x: int, y:int):
self.agentPos = (x, y)
def pickUp(self, item: Item):
self.deliveryItem = item
def drop(self, item: Item):
self.deliveryItem = -1
def identify(item: Item, category: CATEGORY):
item.category = category
def finishOrder(order: Order):
order.id = -1

View File

@ -2,6 +2,7 @@ from data.CATEGORY import CATEGORY
class Item: class Item:
def __init__(self, id: int, category: CATEGORY): def __init__(self, id: int, category: CATEGORY, price: int):
self.id = id self.id = id
self.category = category self.category = category
self.price = price