diff --git a/quartett.py b/quartett.py index 4fb561e..1391a6f 100644 --- a/quartett.py +++ b/quartett.py @@ -79,12 +79,16 @@ def round(card_stack, players_with_cards, players, active, complete_card_stack, if players[active] == "player0": # human player pretty_print_deck(players_with_cards, active) - print('Folgende Spieler stehen zur Verfügung:') - print(players_without_active) # chosen_player has the index of player list - chosen_player = players.index(clean_input.io_str( - 'Welchen Spieler möchtest du nach einer Karte fragen? ', players_without_active)) + if len(players_without_active) > 1: + print('Folgende Spieler stehen zur Verfügung:') + print(players_without_active) + chosen_player = players.index(clean_input.io_str( + 'Welchen Spieler möchtest du nach einer Karte fragen? ', players_without_active)) + else: + chosen_player = 1 + player_request = clean_input.io_card_selection('Welche Karte möchtest du haben? ') if player_request in players_with_cards[chosen_player]['cards_on_hand']: