casino.py 文件源码

python
阅读 37 收藏 0 点赞 0 评论 0

项目:Jumper-Cogs 作者: Redjumpman 项目源码 文件源码
def blackjack(self, ctx, bet: int):
        """Modified Blackjack."""

        # Declare variables for the game.
        user = ctx.message.author
        settings = super().check_server_settings(user.server)

        # Run a logic check to determine if the user can play the game
        check = self.game_checks(settings, ctx.prefix, user, bet, "Blackjack", 1, [1])
        if check:
            msg = check
        else:  # Run the game when the checks return None
            super().withdraw_chips(user, bet)
            settings["Players"][user.id]["Played"]["Blackjack"] += 1
            deck = main_deck[:]  # Make a copy of the deck so we can remove cards that are drawn
            dhand = self.dealer(deck)
            ph, dh, amt = await self.blackjack_game(dhand, user, bet, deck)
            msg = self.blackjack_results(settings, user, amt, ph, dh)
        # Send a message telling the user the outcome of this command
        await self.bot.say(msg)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号