:)))
This commit is contained in:
parent
543b1898a9
commit
41729163f1
@ -5,3 +5,4 @@ class CATEGORY(Enum):
|
||||
PIZZA = 1
|
||||
PASTA = 2
|
||||
EGG = 3
|
||||
UNKNOWN = 4
|
16
data/Game.py
16
data/Game.py
@ -1,3 +1,4 @@
|
||||
from data.CATEGORY import CATEGORY
|
||||
from data.Item import Item
|
||||
from data.Order import Order
|
||||
|
||||
@ -14,3 +15,18 @@ class Game:
|
||||
self.agentHandId = agentHandId
|
||||
self.orderStock = orderStock
|
||||
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
|
@ -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.price = price
|
Loading…
Reference in New Issue
Block a user