diff options
author | 2020-04-07 11:08:57 +0300 | |
---|---|---|
committer | 2020-04-07 11:08:57 +0300 | |
commit | 7d5103c157fa36ba7cc75fa67a0ee062633b4148 (patch) | |
tree | 6fc1ec6a33e6b12f4466165d93256ff0450e601c /bot | |
parent | (TicTacToe): Created `Player` class (diff) |
(TicTacToe): Created `Game` class
Diffstat (limited to 'bot')
-rw-r--r-- | bot/exts/evergreen/tic_tac_toe.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/bot/exts/evergreen/tic_tac_toe.py b/bot/exts/evergreen/tic_tac_toe.py index 1927e021..98d793ba 100644 --- a/bot/exts/evergreen/tic_tac_toe.py +++ b/bot/exts/evergreen/tic_tac_toe.py @@ -1,5 +1,7 @@ +import typing as t + import discord -from discord.ext.commands import Cog +from discord.ext.commands import Cog, Context from bot.bot import SeasonalBot @@ -11,6 +13,15 @@ class Player: self.user = user +class Game: + """Class that contains information and functions about Tic Tac Toe game.""" + + def __init__(self, channel: discord.TextChannel, players: t.List[discord.User], ctx: Context): + self.channel = channel + self.players = players + self.ctx = ctx + + class TicTacToe(Cog): """TicTacToe cog contains tic-tac-toe game commands.""" |