Merge pull request #2 from tsu-nera/master
Add diagonals in game over conditions
This commit is contained in:
commit
e8dcc0fb4f
@ -39,6 +39,11 @@ class TicTacToeEnv(gym.Env):
|
||||
reward = p
|
||||
done = True
|
||||
break
|
||||
# diagonals
|
||||
if((board[0] == p and board[4] == p and board[8] == p)
|
||||
or (board[2] == p and board[4] == p and board[6] == p)):
|
||||
reward = p
|
||||
done = True
|
||||
|
||||
return self.state, reward, done, {}
|
||||
def _reset(self):
|
||||
|
Loading…
Reference in New Issue
Block a user