Explorar el Código

key persistence (#44)

* keys no longer disappear after they are used to unlock a door

* and remove the comment as well
Dzmitry Bahdanau hace 6 años
padre
commit
5f001235c4
Se han modificado 1 ficheros con 0 adiciones y 2 borrados
  1. 0 2
      gym_minigrid/minigrid.py

+ 0 - 2
gym_minigrid/minigrid.py

@@ -233,8 +233,6 @@ class Door(WorldObj):
             if isinstance(env.carrying, Key) and env.carrying.color == self.color:
                 self.is_locked = False
                 self.is_open = True
-                # The key has been used, remove it from the agent
-                env.carrying = None
                 return True
             return False