浏览代码

Allow custom goal colours (#451)

Matt Barker 6 月之前
父节点
当前提交
a6cfc0e125
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      minigrid/core/world_object.py

+ 2 - 2
minigrid/core/world_object.py

@@ -107,8 +107,8 @@ class WorldObj:
 
 
 
 
 class Goal(WorldObj):
 class Goal(WorldObj):
-    def __init__(self):
-        super().__init__("goal", "green")
+    def __init__(self, color: str = "green"):
+        super().__init__("goal", color)
 
 
     def can_overlap(self):
     def can_overlap(self):
         return True
         return True