mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-11-13 14:03:51 +01:00
New Szenario "Two_Rooms_One_Door"
This commit is contained in:
@@ -26,7 +26,8 @@ class ItemAction(Action):
|
||||
reward = r.DROP_OFF_VALID if valid else r.DROP_OFF_FAIL
|
||||
return ActionResult(entity=entity, identifier=self._identifier, validity=valid, reward=reward)
|
||||
|
||||
elif item := state[i.ITEM].by_pos(entity.pos):
|
||||
elif items := state[i.ITEM].by_pos(entity.pos):
|
||||
item = items[0]
|
||||
item.change_parent_collection(inventory)
|
||||
item.set_tile_to(state.NO_POS_TILE)
|
||||
state.print(f'{entity.name} just picked up an item at {entity.pos}')
|
||||
|
||||
@@ -51,7 +51,7 @@ class Inventories(HasBoundMixin, Objects):
|
||||
_entity = Inventory
|
||||
var_can_move = False
|
||||
|
||||
def __init__(self, size, *args, **kwargs):
|
||||
def __init__(self, size: int, *args, **kwargs):
|
||||
super(Inventories, self).__init__(*args, **kwargs)
|
||||
self.size = size
|
||||
self._obs = None
|
||||
|
||||
Reference in New Issue
Block a user