ソースを参照

fix assertion information in Grid.set() (#347)

Mingxuan Li 2 年 前
コミット
2f6e3117ca
1 ファイル変更1 行追加1 行削除
  1. 1 1
      minigrid/core/grid.py

+ 1 - 1
minigrid/core/grid.py

@@ -65,7 +65,7 @@ class Grid:
     def set(self, i: int, j: int, v: WorldObj | None):
         assert (
             0 <= i < self.width
-        ), f"column index {j} outside of grid of width {self.width}"
+        ), f"column index {i} outside of grid of width {self.width}"
         assert (
             0 <= j < self.height
         ), f"row index {j} outside of grid of height {self.height}"