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

@ -4,4 +4,5 @@ from enum import Enum
class CATEGORY(Enum):
PIZZA = 1
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.Order import Order
@ -13,4 +14,19 @@ class Game:
self.deliveryItem = deliveryItem
self.agentHandId = agentHandId
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:
def __init__(self, id: int, category: CATEGORY):
def __init__(self, id: int, category: CATEGORY, price: int):
self.id = id
self.category = category
self.category = category
self.price = price