Browse Source

Allow custom goal colours (#451)

Matt Barker 6 months ago
parent
commit
a6cfc0e125
1 changed files with 2 additions and 2 deletions
  1. 2 2
      minigrid/core/world_object.py

+ 2 - 2
minigrid/core/world_object.py

@@ -107,8 +107,8 @@ class 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):
         return True