diff options
author | 2020-04-12 19:17:15 +0300 | |
---|---|---|
committer | 2020-04-12 19:17:15 +0300 | |
commit | af6357c444cd55fb203cf9696f9b568b27ccd666 (patch) | |
tree | edc794348182e0f8b7bc944da5792bd0f480e32b | |
parent | (TicTacToe): Implemented AI to game and cog. (diff) |
(TicTacToe): Setting winning as priority in AI instead blocking opponent.
-rw-r--r-- | bot/exts/evergreen/tic_tac_toe.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/evergreen/tic_tac_toe.py b/bot/exts/evergreen/tic_tac_toe.py index fc8edd70..72eb2090 100644 --- a/bot/exts/evergreen/tic_tac_toe.py +++ b/bot/exts/evergreen/tic_tac_toe.py @@ -73,7 +73,7 @@ class AI: """Get move from AI. AI use Minimax strategy.""" possible_moves = [i for i, emoji in board.items() if emoji in list(Emojis.number_emojis.values())] - for symbol in (Emojis.x, Emojis.o): + for symbol in (Emojis.o, Emojis.x): for move in possible_moves: board_copy = board.copy() board_copy[move] = symbol |