why lot word when few do trick
This commit is contained in:
parent
7572833e60
commit
a31c7f985c
1 changed files with 11 additions and 17 deletions
28
blackjack.py
28
blackjack.py
|
@ -2,12 +2,17 @@ from src.deck import Deck
|
||||||
from src.io import CLI
|
from src.io import CLI
|
||||||
from src.gamemaster import GameMaster
|
from src.gamemaster import GameMaster
|
||||||
|
|
||||||
def main():
|
kill = False
|
||||||
global kill
|
ui = CLI()
|
||||||
global ui
|
print(ui.intro)
|
||||||
global num_decks
|
num_decks = ui.get_decks()
|
||||||
global deck
|
if num_decks == 'q':
|
||||||
|
kill = True
|
||||||
|
deck = Deck(num_decks)
|
||||||
|
|
||||||
|
while not kill:
|
||||||
game = GameMaster(deck)
|
game = GameMaster(deck)
|
||||||
|
game.active = True
|
||||||
|
|
||||||
game.deal()
|
game.deal()
|
||||||
|
|
||||||
|
@ -18,17 +23,6 @@ def main():
|
||||||
|
|
||||||
print(ui.update(game))
|
print(ui.update(game))
|
||||||
|
|
||||||
kill = False
|
|
||||||
ui = CLI()
|
|
||||||
print(ui.intro)
|
|
||||||
|
|
||||||
num_decks = ui.get_decks()
|
|
||||||
if num_decks == 'q':
|
|
||||||
kill = True
|
|
||||||
|
|
||||||
deck = Deck(num_decks)
|
|
||||||
|
|
||||||
while not kill:
|
|
||||||
main()
|
|
||||||
if not ui.play_again():
|
if not ui.play_again():
|
||||||
kill = True
|
kill = True
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue