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