diff --git a/Acronymbot.py b/Acronymbot.py index 26e9fa5..e21a209 100644 --- a/Acronymbot.py +++ b/Acronymbot.py @@ -118,7 +118,7 @@ async def calculator(interaction: discord.Interaction): #### Game Picker #### """ @tree.command(description="Pick a game") -async def gimmegame(interaction: discord.Interaction): +async def gg(interaction: discord.Interaction): game = pick_game() await interaction.response.send_message(game) diff --git a/BlackJack.py b/BlackJack.py index 24f1f5e..99f4bd1 100644 --- a/BlackJack.py +++ b/BlackJack.py @@ -163,12 +163,13 @@ class BlackJack: return "w" async def play_game(self, ID, bet, recv, send): + + self.gameState = INIT while self.gameState != OVER: if self.gameState == INIT: - gameOver = False playerStats = self.ledger.read(ID) if playerStats is None: self.ledger.write(ID) @@ -176,6 +177,7 @@ class BlackJack: self.deal() play = None + self.playerTurn = True playerStood = False dealerStood = False validInput = False diff --git a/Gamepicker.py b/Gamepicker.py index 508d395..1929221 100644 --- a/Gamepicker.py +++ b/Gamepicker.py @@ -18,7 +18,6 @@ games = ["Left 4 Dead 2", def add_game(game: str): games.append(game) - def pick_game(): randomIndex = random.randrange(0, len(games)) @@ -29,3 +28,19 @@ def pick_game(): else: return games[randomIndex] + +I = 1000000000 +i = I +zeros = 0 +ones = 0 +while i > 0: + number = random.randrange(0, 2) + if number: + ones += 1 + + else: + zeros += 1 + i -= 1 + +percentZeros = zeros/I +print(percentZeros) diff --git a/__pycache__/BlackJack.cpython-310.pyc b/__pycache__/BlackJack.cpython-310.pyc index ff9eb03..27c3463 100644 Binary files a/__pycache__/BlackJack.cpython-310.pyc and b/__pycache__/BlackJack.cpython-310.pyc differ diff --git a/ledger.db b/ledger.db index 7fac181..0704eba 100644 Binary files a/ledger.db and b/ledger.db differ