浏览代码

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