Skip to content

Commit

Permalink
Fix issue when generating non-square DoorKey environments (Farama-Fou…
Browse files Browse the repository at this point in the history
  • Loading branch information
rbanko committed Apr 22, 2024
1 parent 617e490 commit 9b8f7b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion minigrid/envs/doorkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def _gen_grid(self, width, height):
self.place_agent(size=(splitIdx, height))

# Place a door in the wall
doorIdx = self._rand_int(1, width - 2)
doorIdx = self._rand_int(1, height - 2)
self.put_obj(Door("yellow", is_locked=True), splitIdx, doorIdx)

# Place a yellow key on the left side
Expand Down

0 comments on commit 9b8f7b7

Please sign in to comment.