fixing blackjack and improving lookup
This commit is contained in:
@ -65,7 +65,7 @@ class Blackjack(CardGame):
|
||||
|
||||
def __init__(self, bot):
|
||||
"""Initialize the class."""
|
||||
super().__init__(bot, "blackjack", DrawBlackjack(bot, self), 4)
|
||||
super().__init__(bot, "blackjack", DrawBlackjack, 4)
|
||||
default_buttons = ["Hit", "Stand", "Double", "Split"]
|
||||
self.default_buttons = [(i, [i, "0"], 1) for i in default_buttons]
|
||||
|
||||
@ -295,7 +295,7 @@ class Blackjack(CardGame):
|
||||
|
||||
return user_hands, all_standing, pre_all_standing
|
||||
|
||||
def _blackjack_finish(self, channel: Messageable):
|
||||
async def _blackjack_finish(self, channel: Messageable):
|
||||
"""
|
||||
Generate the winnings message after the blackjack game ends.
|
||||
|
||||
@ -442,7 +442,7 @@ class Blackjack(CardGame):
|
||||
self.bot.log(log_message, str(channel.id))
|
||||
await self._blackjack_loop(channel, game_round+1, game_id)
|
||||
else:
|
||||
await channel.send(self._blackjack_finish(channel))
|
||||
await channel.send(await self._blackjack_finish(channel))
|
||||
|
||||
async def _get_hand_number(self, ctx: IntCont, command: str,
|
||||
hands_amount: int):
|
||||
@ -776,7 +776,7 @@ class Blackjack(CardGame):
|
||||
|
||||
if len(game["user hands"]) == 0:
|
||||
await ctx.channel.send("No one entered the game. Ending the game.")
|
||||
await ctx.channel.send(self._blackjack_finish(ctx.channel))
|
||||
await ctx.channel.send(await self._blackjack_finish(ctx.channel))
|
||||
return
|
||||
|
||||
game_id = game["game_id"]
|
||||
|
Reference in New Issue
Block a user