- Timestamp:
- 08/20/2016 09:13:35 PM (8 years ago)
- branch-nick:
- state
- revision id:
- dsowen@fugue88.ws-20160820211335-56x5uo7wks6bal0x
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main.py
r6.1.34 r6.1.35 41 41 self.player_count = player_count 42 42 self.mission = 0 43 self.captain = 0 43 44 44 45 … … 89 90 wins = 0 90 91 losses = 0 91 captain = 092 92 team_failures = 0 93 93 team = None 94 94 95 95 def assemble_team(): 96 nonlocal captain,team, team_failures96 nonlocal team, team_failures 97 97 98 print("Captain is {}".format( captain))99 team = players[ captain].propose_team(state.team_size)98 print("Captain is {}".format(state.shared.captain)) 99 team = players[state.shared.captain].propose_team(state.team_size) 100 100 print("He proposed {}".format(team)) 101 101 … … 112 112 p.observe_team_vote(approved, votes) 113 113 114 captain = (captain + 1) % state.shared.player_count114 state.shared.captain = (state.shared.captain + 1) % state.shared.player_count 115 115 116 116 if approved:
Note: See TracChangeset
for help on using the changeset viewer.