diff --git a/gym_tic_tac_toe/envs/tic_tac_toe_env.py b/gym_tic_tac_toe/envs/tic_tac_toe_env.py index 5c374aa..4406f35 100644 --- a/gym_tic_tac_toe/envs/tic_tac_toe_env.py +++ b/gym_tic_tac_toe/envs/tic_tac_toe_env.py @@ -55,8 +55,10 @@ class TicTacToeEnv(gym.Env): def move_generator(self): moves = [] for i in range (9): + if (self.state['board'][i]== 0): p = self.state['on_move'] m = [p, i] moves.append(m) + return moves