27 lines
762 B
Python
27 lines
762 B
Python
|
from data import Game, Order
|
||
|
|
||
|
|
||
|
def pickBestOrder(game: Game) -> Order:
|
||
|
maxi = game.orderList[0]
|
||
|
for i in range(len(game.orderList)):
|
||
|
if(game.orderList[i].money > maxi.money):
|
||
|
maxi = game.orderList[i]
|
||
|
|
||
|
return maxi
|
||
|
|
||
|
def realizeOrder(game: Game, orderId: int):
|
||
|
return 1
|
||
|
|
||
|
def getCorrectStockPile(game: Game) -> (int, int):
|
||
|
return game.stockPilePos[game.carriedItem.category].pos
|
||
|
|
||
|
def TwojStary(game: Game) -> (int, int):
|
||
|
if len(game.orderList) == 0:
|
||
|
if game.carriedItem is None:
|
||
|
return game.deliveryPos
|
||
|
else:
|
||
|
return getCorrectStockPile(game)
|
||
|
elif game.carriedItem is None:
|
||
|
return realizeOrder(game, pickBestOrder(game))
|
||
|
else:
|
||
|
return getCorrectStockPile(game)
|