Skip to content

Commit

Permalink
custom image path not passed to loader correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Bam4d committed Apr 21, 2021
1 parent 828726f commit ce0e53f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/griddly/GymWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class GymWrapper(gym.Env):
metadata = {'render.modes': ['human', 'rgb_array']}

def __init__(self, yaml_file=None, level=0, global_observer_type=gd.ObserverType.VECTOR,
player_observer_type=gd.ObserverType.VECTOR, max_steps=None, image_path=None, shader_path=None,
player_observer_type=gd.ObserverType.VECTOR, max_steps=None, gdy_path=None, image_path=None, shader_path=None,
gdy=None, game=None, **kwargs):
"""
Currently only supporting a single player (player 1 as defined in the environment yaml
Expand All @@ -30,7 +30,7 @@ def __init__(self, yaml_file=None, level=0, global_observer_type=gd.ObserverType
# If we are loading a yaml file
if yaml_file is not None:
self._is_clone = False
loader = GriddlyLoader(image_path, shader_path)
loader = GriddlyLoader(gdy_path, image_path, shader_path)
self.gdy = loader.load(yaml_file)
self.game = self.gdy.create_game(global_observer_type)

Expand Down

0 comments on commit ce0e53f

Please sign in to comment.