Skip to content

Commit

Permalink
Allow custom goal colours (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-barker authored Oct 6, 2024
1 parent 715394f commit a6cfc0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions minigrid/core/world_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ def render(self, r: np.ndarray) -> np.ndarray:


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
Expand Down

0 comments on commit a6cfc0e

Please sign in to comment.