浏览代码

`goal` can now overlap.

Lucas Willems 7 年之前
父节点
当前提交
f09b7944dd
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      gym_minigrid/minigrid.py

+ 4 - 1
gym_minigrid/minigrid.py

@@ -93,6 +93,9 @@ class Goal(WorldObj):
     def __init__(self):
         super(Goal, self).__init__('goal', 'green')
 
+    def canOverlap(self):
+        return True
+
     def render(self, r):
         self._setColor(r)
         r.drawPolygon([
@@ -472,7 +475,7 @@ class Grid:
 
         return array
 
-    def decode(array):
+    def decode(self, array):
         """
         Decode an array grid encoding back into a grid
         """