active in central_function() is now random
This commit is contained in:
parent
7b6851c9de
commit
a0474000ba
|
@ -16,11 +16,10 @@ def central_function():
|
||||||
does everything, keeps order
|
does everything, keeps order
|
||||||
'''
|
'''
|
||||||
|
|
||||||
active = 0 # contains index of the active player
|
|
||||||
|
|
||||||
switch = True
|
switch = True
|
||||||
|
|
||||||
card_stack, players_with_cards, players, complete_card_stack = initialize()
|
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
|
# stores the dropped cards
|
||||||
all_quartets = []
|
all_quartets = []
|
||||||
|
@ -277,7 +276,7 @@ def the_winner_is(players_with_cards, players):
|
||||||
if winners[i] == temp:
|
if winners[i] == temp:
|
||||||
print(players[i], "has won the game!")
|
print(players[i], "has won the game!")
|
||||||
|
|
||||||
|
|
||||||
# Call central_function() only if quartett.py is the main module
|
# Call central_function() only if quartett.py is the main module
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
central_function()
|
central_function()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user