active in central_function() is now random

This commit is contained in:
Steinadler 2021-01-13 18:36:39 +01:00
parent 7b6851c9de
commit a0474000ba
1 changed files with 13 additions and 14 deletions

View File

@ -16,11 +16,10 @@ def central_function():
does everything, keeps order
'''
active = 0 # contains index of the active player
switch = True
card_stack, players_with_cards, players, complete_card_stack = initialize()
active = random.randint(0, len(players) - 1) # contains index of the active player
# stores the dropped cards
all_quartets = []
@ -277,7 +276,7 @@ def the_winner_is(players_with_cards, players):
if winners[i] == temp:
print(players[i], "has won the game!")
# Call central_function() only if quartett.py is the main module
if __name__ == "__main__":
central_function()