io do io things

This commit is contained in:
Adam 2022-12-28 02:11:08 -05:00
parent 8076cb6b15
commit 705b5a849f
2 changed files with 4 additions and 3 deletions

View file

@ -20,9 +20,7 @@ def main():
ui.update(game) ui.update(game)
if game.active: if game.active:
user_input = input(str(deck.count()) + ' cards left in deck.\n[H]it or [S]tand? ') match ui.player_move(deck).lower():
match user_input.lower():
case 'y': case 'y':
game.active = False game.active = False
case 'q': case 'q':

View file

@ -121,3 +121,6 @@ o8YooP' 8 .oPYo. .oPYo. 8 .o 8 .oPYo. .oPYo. 8 .o
return False return False
case _: case _:
return True return True
def player_move(self, deck):
return input(str(deck.count()) + ' cards left in deck.\n[H]it or [S]tand? ')