Преглед на файлове

key persistence (#44)

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

* and remove the comment as well
Dzmitry Bahdanau преди 6 години
родител
ревизия
5f001235c4
променени са 1 файла, в които са добавени 0 реда и са изтрити 2 реда
  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