rearranged clearing of the hand and terminal

This commit is contained in:
2025-10-29 21:23:08 +01:00
parent a0175343f9
commit acd5fa7201
2 changed files with 7 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
import os
from pyjack.dealer import Dealer
from pyjack.deck import Deck
from pyjack.player import Player
@@ -104,8 +105,6 @@ class Game:
player = self.player
dealer = self.dealer
player.hand.__init__()
dealer.hand.__init__()
# beginning of a round, shuffle deck and deal cards
deck.shuffle()
@@ -130,4 +129,9 @@ class Game:
dealer.play(deck)
self.show_cards()
os.system("clear")
print(self.compare_hands(0))
player.hand.__init__()
dealer.hand.__init__()
deck.__init__()

View File

@@ -9,5 +9,5 @@ if __name__ == "__main__":
game = Game()
while True:
os.system("clear")
# os.system("clear")
game.play_round()