fixing blackjack and improving lookup

This commit is contained in:
Nikolaj
2022-01-28 11:33:47 +01:00
parent cbf2ca765e
commit 05cd5831e1
10 changed files with 219 additions and 160 deletions

View File

@ -75,7 +75,7 @@ class ConnectFour(BoardGame):
def __init__(self, bot):
"""Initialize the class."""
super().__init__(bot, "connectfour", DrawConnectFour(bot))
super().__init__(bot, "connectfour", DrawConnectFour)
self.get_name = self.bot.database_funcs.get_name
# pylint: disable=invalid-name
self.AISCORES = {
@ -108,7 +108,7 @@ class ConnectFour(BoardGame):
await self.bot.defer(ctx)
channel = str(ctx.channel_id)
opponent_info = self._test_opponent(ctx, opponent)
opponent_info = await self._test_opponent(ctx, opponent)
if not opponent_info:
return
@ -710,7 +710,7 @@ class DrawConnectFour():
White, but with the alpha set to win_bar_alpha.
"""
def __init__(self, bot):
def __init__(self, bot, game):
"""Initialize the class."""
self.bot = bot
self.get_name = self.bot.database_funcs.get_name