added option that chosen_player selection ist only shown when there are more than 1 AI players
This commit is contained in:
parent
40a7be152c
commit
ef57e98647
12
quartett.py
12
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']:
|
||||
|
|
Loading…
Reference in New Issue