mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-07-06 01:21:36 +02:00
New Szenario "Two_Rooms_One_Door"
This commit is contained in:
@ -13,7 +13,9 @@ class DestAction(Action):
|
||||
super().__init__(d.DESTINATION)
|
||||
|
||||
def do(self, entity, state) -> Union[None, ActionResult]:
|
||||
if destination := state[d.DESTINATION].by_pos(entity.pos):
|
||||
dest_entities = d.DESTINATION if d.DESTINATION in state else d.BOUNDDESTINATION
|
||||
assert dest_entities
|
||||
if destination := state[dest_entities].by_pos(entity.pos):
|
||||
valid = destination.do_wait_action(entity)
|
||||
state.print(f'{entity.name} just waited at {entity.pos}')
|
||||
else:
|
||||
|
Reference in New Issue
Block a user