Fixed control ofdealer bug

This commit is contained in:
2023-06-12 17:29:25 +10:00
parent 6e80036ba7
commit b2dad99f6c
5 changed files with 20 additions and 3 deletions

View File

@@ -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