From 3d51687b516cf95d4220c8a409df2fd5b2c74a08 Mon Sep 17 00:00:00 2001 From: BigGamerGary Date: Mon, 14 Aug 2023 18:36:15 +1000 Subject: [PATCH] Minor changes --- Acronymbot.py | 2 +- BlackJack.py | 8 ++++---- Calculator.py | 2 +- Gamepicker.py | 1 - __pycache__/BlackJack.cpython-310.pyc | Bin 9198 -> 9280 bytes ledger.db | Bin 8192 -> 8192 bytes 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Acronymbot.py b/Acronymbot.py index cb789b6..8d85260 100644 --- a/Acronymbot.py +++ b/Acronymbot.py @@ -120,7 +120,7 @@ async def calculator(interaction: discord.Interaction): async def gg(interaction: discord.Interaction): game = pick_game() - await interaction.response.send_message(game) + await interaction.response.send_message("Barotrauma") """ diff --git a/BlackJack.py b/BlackJack.py index e6f8258..0e7ae30 100644 --- a/BlackJack.py +++ b/BlackJack.py @@ -1,7 +1,6 @@ import random from Ledger import Ledger -#TODO Kill Benson #TODO Starting a game with 21 fucks with hidden cards #TODO Look into 5card jack thingo that Tim mentioned #TODO Insurance - If dealer starts with 21, you can bet against it and win your money back @@ -127,10 +126,11 @@ class Hand(): def remove_from_hand(self, index): return self.hand.pop(index) + def peek_card(self, index): + return self.hand[index] + def hide_card(self, index): - card = self.remove_from_hand(index) - card.turn_card() - self.add_to_hand(card, index) + self.peek_card(index).turn_card() def __len__(self): return len(self.hand) diff --git a/Calculator.py b/Calculator.py index 37437e0..d67c57a 100644 --- a/Calculator.py +++ b/Calculator.py @@ -141,7 +141,7 @@ class Calculator(discord.ui.View): else: self.clearRequirement += 1 self.output = self.expression(self.inputTwo, self.inputOne) - if (self.inputTwo == 9) and (self.inputOne == 10): + if (self.inputTwo == 9) and (self.inputOne == 10) and (self.expression == addition): self.output = 21 await interaction.response.edit_message( content=self.display(), diff --git a/Gamepicker.py b/Gamepicker.py index 2f07d3b..fd5cfe4 100644 --- a/Gamepicker.py +++ b/Gamepicker.py @@ -22,7 +22,6 @@ def pick_game(): randomIndex = random.randrange(0, len(games)) coinFlip = random.randrange(0, 2) - print(coinFlip) if coinFlip: return f"Valorant ({games[randomIndex]})" diff --git a/__pycache__/BlackJack.cpython-310.pyc b/__pycache__/BlackJack.cpython-310.pyc index d5d9e8cce107bed8c6703c086c954cb87334f796..78ebbd4bccb24488e09dc231da19c81a80792b96 100644 GIT binary patch delta 1098 zcmZ9KO>7fK6oB{buASM9cjK(>*Z~4@4TXRRLi|XOR$!4pOrxkcK!_=}OvWSu;=ni% zKvp6o3q%j4>O*kglAsm|MI2gRdZ|>2BS?q?7mEW(T#!&Ny>KGDw}u|NtNG^r&)YZq z&!N8uof*fmHG0HPFJ$d^C#S<2oYdzaiLdnu*noq^Y1mX>HiiJU;0Ln`eRwJG7$Wsl z@IAmm42uOggm1(Sd?LE=w%CbLs|#NX3-?-Mkj6XKZ5YP&_6!`sJN7&r#YpSVZ~}jA z{Si*$wvd86J_y}~BJOeSgT$B45=`QpI}2re@7{p@SZUk0FiRblv>Zq+r^`-hNV8_< z3>lEYnwB%=D%m1M4RQf#Nt-M|*(yV{w@632vB?bw46lbGzj*C1kDk}NQ70R(1GFkU{i=3Wt3szXqNymU>Nw*h zCKJ)pg;MEUVZ5m1b+(NVuDR5a?ETL%&ZWLQEE}}^(jEy_ZIMbZ!6Gbapvf;s^yumo zc@>8=Pr_x-vTCem2>8V7qidfpb&TYTv?>XL&}>HAMjpQ9K+A(PP3VtxUxt)>}%(RrRpN}VCYAG9hi!Ji4w!?pt<;rqrl z%qJ3fw<2li^?5G_2@`T$z+yS@PJc+K@3LWL${8=wb$Y!TnH z1Nes3K@2~z0XTvC-6=SVYwmk+3Y*O=#Bt5M1;ZHh+=o$o?70i)aIaTD5+8ckVH{hn z2av`sYZEd!XXhb{+x7}{Vy?Vn@rpcKT1fy`5-P9a8rPTggvMRmSXL4`5A!n4mLcKd zZf?qq!9Cn7*D`K#Tds^l+I>mo<=iLx%)dK756GQ|2YEbQgd@ek)`MpDg6?j_s46V#IEzc(AhL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