added tab in line 25 in quartett.py
This commit is contained in:
parent
269ee73642
commit
68d4eada8c
12
quartett.py
12
quartett.py
|
@ -9,7 +9,6 @@ import clean_input
|
||||||
def central_function():
|
def central_function():
|
||||||
''' does everything, keeps order'''
|
''' does everything, keeps order'''
|
||||||
|
|
||||||
|
|
||||||
active = 0 # contains index of the active player
|
active = 0 # contains index of the active player
|
||||||
|
|
||||||
..., players_with_cards, players = initialize()[0], initialize()[1], initialize()[2]
|
..., players_with_cards, players = initialize()[0], initialize()[1], initialize()[2]
|
||||||
|
@ -21,21 +20,20 @@ def central_function():
|
||||||
def round(..., players_with_cards, players):
|
def round(..., players_with_cards, players):
|
||||||
'''structures one round in the game'''
|
'''structures one round in the game'''
|
||||||
|
|
||||||
|
while player_request in deck_of_player:
|
||||||
while player_request in deck_of_player:
|
|
||||||
choose(..., players_with_cards, players)
|
choose(..., players_with_cards, players)
|
||||||
|
|
||||||
|
|
||||||
def choose(..., players_with_cards, players):
|
def choose(..., players_with_cards, players):
|
||||||
"""active player chooses another player from whom to steal a card"""
|
"""active player chooses another player from whom to steal a card"""
|
||||||
|
|
||||||
|
|
||||||
players_without_active = players.pop(active_player)
|
players_without_active = players.pop(active_player)
|
||||||
print('Folgende Spieler stehen zur Verfügung:')
|
print('Folgende Spieler stehen zur Verfügung:')
|
||||||
print(players_without_active)
|
print(players_without_active)
|
||||||
|
# needs clean.io, chosen_player enthält den index in der players liste
|
||||||
chosen_player = players.index(input(
|
chosen_player = players.index(input(
|
||||||
'Welchen Spieler möchtest du befragen?')) # needs clean.io, chosen_player enthält den index in der players liste
|
'Welchen Spieler möchtest du befragen?'))
|
||||||
player_request = input('Welche Karte möchtest du haben?') # TO DO needs clean.io dict magic
|
player_request = input('Welche Karte möchtest du haben?') # TODO: needs clean.io dict magic
|
||||||
|
|
||||||
if player_request in players_with_cards[chosen_player]['cards_on_hand']:
|
if player_request in players_with_cards[chosen_player]['cards_on_hand']:
|
||||||
steal(P1, P2)
|
steal(P1, P2)
|
||||||
|
@ -91,5 +89,3 @@ def initialize():
|
||||||
|
|
||||||
# print(len(card_deck))
|
# print(len(card_deck))
|
||||||
# print(players_with_cards)
|
# print(players_with_cards)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue