diff --git a/GhostBallBot/game/end_game.py b/GhostBallBot/game/end_game.py index f32a083..67664a8 100644 --- a/GhostBallBot/game/end_game.py +++ b/GhostBallBot/game/end_game.py @@ -10,6 +10,7 @@ from database.models import GameModel as Game, GuessModel as Guess from game.manager import BaseGameManager from game.process_guess import ProcessGuess + class EndGameManager(BaseGameManager): """Commands that run at the end of a game""" diff --git a/GhostBallBot/game/guess.py b/GhostBallBot/game/guess.py index 3237cc9..d6cf294 100644 --- a/GhostBallBot/game/guess.py +++ b/GhostBallBot/game/guess.py @@ -9,6 +9,7 @@ import uuid from database.models import PlayerModel as Player, GuessModel as Guess from game.manager import BaseGameManager + class GuessManager(BaseGameManager): """Commands that run when a player makes a guess""" @@ -42,8 +43,7 @@ class GuessManager(BaseGameManager): ) Guess.update({"guess": value}).where( - (Guess.game == self.game.game_id) - & (Guess.player == self.message.author.id) + (Guess.game == self.game.game_id) & (Guess.player == self.message.author.id) ).execute() if created: diff --git a/GhostBallBot/game/help.py b/GhostBallBot/game/help.py index 39ae807..6b18687 100644 --- a/GhostBallBot/game/help.py +++ b/GhostBallBot/game/help.py @@ -6,6 +6,7 @@ from game.manager import BaseGameManager + class HelpManager(BaseGameManager): """Commands that run when a player asks for help""" diff --git a/GhostBallBot/game/manager.py b/GhostBallBot/game/manager.py index c5d663a..71a3335 100644 --- a/GhostBallBot/game/manager.py +++ b/GhostBallBot/game/manager.py @@ -18,6 +18,7 @@ from game.guess import GuessManager from game.points import PointsManager from game.help import HelpManager + class BaseGameManager: """Base Game Manager for each Game Manager class to inherit""" @@ -51,7 +52,10 @@ class BaseGameManager: """ database.close() -class GameManager(NewGameManager, EndGameManager, GuessManager, PointsManager, HelpManager): + +class GameManager( + NewGameManager, EndGameManager, GuessManager, PointsManager, HelpManager +): """ Represents what this bot is able to do on a channel (or DMs) """ diff --git a/GhostBallBot/game/new_game.py b/GhostBallBot/game/new_game.py index 8176b81..276d5a9 100644 --- a/GhostBallBot/game/new_game.py +++ b/GhostBallBot/game/new_game.py @@ -9,6 +9,7 @@ import uuid from database.models import GameModel as Game from game.manager import BaseGameManager + class NewGameManager(BaseGameManager): """Commands that run at the start of a new game""" diff --git a/GhostBallBot/game/points.py b/GhostBallBot/game/points.py index 4565dfc..3c14b3b 100644 --- a/GhostBallBot/game/points.py +++ b/GhostBallBot/game/points.py @@ -7,6 +7,7 @@ from database.models import PlayerModel as Player from game.manager import BaseGameManager + class PointsManager(BaseGameManager): """Commands that run when a player makes a guess"""