stuff
This commit is contained in:
parent
53e80090d9
commit
947a371fc4
2 changed files with 9 additions and 4 deletions
|
@ -15,13 +15,13 @@ class Deck:
|
|||
n_decks = 8 if n_decks > 8 else n_decks
|
||||
suits = '♠♥♦♣'
|
||||
cards = 'A234567890JQK'
|
||||
# cards = 'A0A0A0A0A0A0A'
|
||||
|
||||
while n_decks > 0:
|
||||
self.cards += [card + suit for card in cards for suit in suits]
|
||||
n_decks -= 1
|
||||
|
||||
def check(self):
|
||||
if self.count() < 4:
|
||||
if self.count() < 1:
|
||||
self.shuffle(self.n_decks)
|
||||
|
||||
def draw(self):
|
||||
|
|
|
@ -11,6 +11,7 @@ o8YooP' 8 .oPYo. .oPYo. 8 .o 8 .oPYo. .oPYo. 8 .o
|
|||
:......:..:.....::.....:..::......::.....::.....:..::...
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::'''
|
||||
|
||||
self.clear = '\033c'
|
||||
self.intro = self.clear + self.title
|
||||
self.deck = '''\
|
||||
|
@ -21,6 +22,7 @@ o8YooP' 8 .oPYo. .oPYo. 8 .o 8 .oPYo. .oPYo. 8 .o
|
|||
│░░░░░░░░││││││
|
||||
│░░░░░░░░││││││
|
||||
└────────┘┘┘┘┘┘'''
|
||||
|
||||
self.hidden_part = f'''\
|
||||
┌──
|
||||
│░░
|
||||
|
@ -29,6 +31,7 @@ o8YooP' 8 .oPYo. .oPYo. 8 .o 8 .oPYo. .oPYo. 8 .o
|
|||
│░░
|
||||
│░░
|
||||
└──'''
|
||||
|
||||
self.hidden_rest = f'''\
|
||||
──────┐
|
||||
░░░░░░│
|
||||
|
@ -37,6 +40,7 @@ o8YooP' 8 .oPYo. .oPYo. 8 .o 8 .oPYo. .oPYo. 8 .o
|
|||
░░░░░░│
|
||||
░░░░░░│
|
||||
──────┘'''
|
||||
|
||||
self.card_rest = f'''\
|
||||
──────┐
|
||||
│
|
||||
|
@ -50,6 +54,7 @@ o8YooP' 8 .oPYo. .oPYo. 8 .o 8 .oPYo. .oPYo. 8 .o
|
|||
value = vs[0]
|
||||
value = '10' if value == '0' else value + ' '
|
||||
suit = vs[1] + ' '
|
||||
|
||||
# request text (not emoji) render of preceeding glyph but can break some fonts
|
||||
# suit += '\uFE0E'
|
||||
|
||||
|
@ -94,6 +99,6 @@ o8YooP' 8 .oPYo. .oPYo. 8 .o 8 .oPYo. .oPYo. 8 .o
|
|||
print(self.clear)
|
||||
print(self.title)
|
||||
for player in game.players:
|
||||
print(' '+player.name,
|
||||
'\t\t\t\t Score:',player.score(game))
|
||||
print(' '+player.name,'''\
|
||||
Score:''', player.score(game))
|
||||
self.print_hand(player, game)
|
||||
|
|
Loading…
Add table
Reference in a new issue