Prechádzať zdrojové kódy

Update roomgrid.py (#176)

Use `==` instead of `is` for literal comparison.
Zhitao Gong 3 rokov pred
rodič
commit
bf4dbaabe6
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      gym_minigrid/roomgrid.py

+ 1 - 1
gym_minigrid/roomgrid.py

@@ -299,7 +299,7 @@ class RoomGrid(MiniGridEnv):
         while True:
             super().place_agent(room.top, room.size, rand_dir, max_tries=1000)
             front_cell = self.grid.get(*self.front_pos)
-            if front_cell is None or front_cell.type is 'wall':
+            if front_cell is None or front_cell.type == 'wall':
                 break
 
         return self.agent_pos