Changed user input for decision to a single character

This commit is contained in:
Donald Calloway 2025-09-19 09:22:33 -07:00
parent c6e189d392
commit e44e9acc27

View File

@ -72,19 +72,19 @@ def betting_round(players: list, current_bet: int, pot: int) -> tuple[int, int]:
print(f"\n{player.name}'s turn — Chips: {player.chips}")
print(f"Visible cards: {' '.join(str(card) for card in player.face_up_cards)}")
decision = input("Choose action (call, raise, fold): ").strip().lower()
decision = input("Choose action: call(c), raise(r) or fold(f): ").strip().lower()
if decision == 'fold':
if decision == 'f':
player.folded = True
print(f"{player.name} folds.")
elif decision == 'call':
elif decision == 'c':
try:
pot += player.place_bet(current_bet)
print(f"{player.name} calls {current_bet}.")
except ValueError as e:
print(e)
player.folded = True
elif decision == 'raise':
elif decision == 'r':
try:
raise_amount = int(input("Enter raise amount: "))
total_bet = current_bet + raise_amount