updated base factory

This commit is contained in:
romue 2021-05-11 17:47:17 +02:00
parent 65cf5c5c6f
commit 6b4ccf0a24

View File

@ -74,10 +74,10 @@ class BaseFactory:
def move_or_colide(self, agent_i, action) -> ((int, int), bool):
old_pos, new_pos, valid = h.check_agent_move(state=self.state,
dim=agent_i + h.AGENT_START_IDX,
action=action)
dim=agent_i + h.AGENT_START_IDX,
action=action)
if valid:
# Does not collide width level boundrys
# Does not collide width level boundaries
self.move(agent_i, old_pos, new_pos)
return new_pos, valid
return old_pos, valid