2022-04-14 23:21:44 +02:00
|
|
|
from data import Direction
|
2022-04-16 14:55:25 +02:00
|
|
|
from data.ItemType import ItemType
|
2022-03-24 20:43:53 +01:00
|
|
|
from data.Item import Item
|
|
|
|
from data.Order import Order
|
2022-04-14 23:21:44 +02:00
|
|
|
from typing import Dict
|
2022-03-24 20:43:53 +01:00
|
|
|
|
|
|
|
class Game:
|
2022-04-14 23:21:44 +02:00
|
|
|
def __init__(self, id: int, agentPos: (int, int), agentDirection: Direction, deliveryPos: (int, int), orderPos: (int,int), stockPilePos: Dict,
|
|
|
|
deliveryItem: Item, carriedItem: Item, orderStock: Dict, orderList: [Order]):
|
|
|
|
self.agentDirection = agentDirection
|
2022-03-24 20:43:53 +01:00
|
|
|
self.id = id
|
|
|
|
self.agentPos = agentPos
|
|
|
|
self.deliveryPos = deliveryPos
|
|
|
|
self.orderPos = orderPos
|
|
|
|
self.stockPilePos = stockPilePos
|
|
|
|
self.deliveryItem = deliveryItem
|
2022-04-14 23:21:44 +02:00
|
|
|
self.carriedItem = carriedItem
|
2022-03-24 20:43:53 +01:00
|
|
|
self.orderStock = orderStock
|
2022-03-25 09:48:42 +01:00
|
|
|
self.orderList = orderList
|
|
|
|
|
2022-04-14 23:21:44 +02:00
|
|
|
def getCopy(self):
|
|
|
|
newGame = Game(self)
|
|
|
|
return newGame
|
|
|
|
# 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
|