aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Shivansh <[email protected]>2021-05-15 09:26:43 +0530
committerGravatar Shivansh <[email protected]>2021-05-15 09:26:43 +0530
commitc6544d0fdc71be42a816c33971b19485137afcc8 (patch)
treeec1d9d3c2e666c2b342f6657f98ff6e016ffa86a
parentMerge pull request #645 from python-discord/bookmark-react-for-copy (diff)
(tic-tac-toe): Update x and o emoji
-rw-r--r--bot/constants.py3
-rw-r--r--bot/exts/evergreen/tic_tac_toe.py6
2 files changed, 6 insertions, 3 deletions
diff --git a/bot/constants.py b/bot/constants.py
index 549d01b6..d50dcc6e 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -214,6 +214,9 @@ class Emojis:
x = "\U0001f1fd"
o = "\U0001f1f4"
+ x_square = "<:x_square:632278427260682281>"
+ o_square = "<:o_square:632278452413661214>"
+
status_online = "<:status_online:470326272351010816>"
status_idle = "<:status_idle:470326266625785866>"
status_dnd = "<:status_dnd:470326272082313216>"
diff --git a/bot/exts/evergreen/tic_tac_toe.py b/bot/exts/evergreen/tic_tac_toe.py
index 6e21528e..5d0f15b4 100644
--- a/bot/exts/evergreen/tic_tac_toe.py
+++ b/bot/exts/evergreen/tic_tac_toe.py
@@ -79,7 +79,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.o, Emojis.x):
+ for symbol in (Emojis.o_square, Emojis.x_square):
for move in possible_moves:
board_copy = board.copy()
board_copy[move] = symbol
@@ -266,12 +266,12 @@ class TicTacToe(Cog):
return
if opponent is None:
game = Game(
- [Player(ctx.author, ctx, Emojis.x), AI(Emojis.o)],
+ [Player(ctx.author, ctx, Emojis.x_square), AI(Emojis.o_square)],
ctx
)
else:
game = Game(
- [Player(ctx.author, ctx, Emojis.x), Player(opponent, ctx, Emojis.o)],
+ [Player(ctx.author, ctx, Emojis.x_square), Player(opponent, ctx, Emojis.o_square)],
ctx
)
self.games.append(game)