BaljinderH commited on
Commit
7178054
·
verified ·
1 Parent(s): f508622

Update tetris_env.py

Browse files
Files changed (1) hide show
  1. tetris_env.py +2 -0
tetris_env.py CHANGED
@@ -91,6 +91,8 @@ class TetrisEnv(gym.Env):
91
  return self._get_obs(), reward, done, {}
92
 
93
  def _get_obs(self):
 
 
94
  """
95
  Get the current state of the game as an observation
96
  """
 
91
  return self._get_obs(), reward, done, {}
92
 
93
  def _get_obs(self):
94
+ if self.game.field is None:
95
+ raise ValueError("The field attribute in self.game is None.")
96
  """
97
  Get the current state of the game as an observation
98
  """