From ef479f61c9d7dbc9c93f243299dfe366d2272937 Mon Sep 17 00:00:00 2001 From: Matt Barker <105945282+m-barker@users.noreply.github.com> Date: Wed, 2 Oct 2024 13:33:45 +0100 Subject: [PATCH] feat: allow custom goal colours --- minigrid/core/world_object.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/minigrid/core/world_object.py b/minigrid/core/world_object.py index a1fe01911..ea13f6d45 100644 --- a/minigrid/core/world_object.py +++ b/minigrid/core/world_object.py @@ -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