- Timestamp:
- 08/20/2016 09:07:13 PM (8 years ago)
- branch-nick:
- state
- revision id:
- dsowen@fugue88.ws-20160820210713-w56f9zdq80jpkyfj
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main.py
r6.1.31 r6.1.32 40 40 def __init__(self, player_count): 41 41 self.player_count = player_count 42 self.mission = 0 42 43 43 44 … … 84 85 captain = 0 85 86 team_failures = 0 86 mission = 087 87 team = None 88 88 89 89 def advance_mission(): 90 nonlocal mission 91 mission += 1 92 team_size = mission_size(state.shared.player_count, mission) 93 print("Mission {} needs {} members".format(mission, team_size)) 90 state.shared.mission += 1 91 team_size = mission_size(state.shared.player_count, state.shared.mission) 92 print("Mission {} needs {} members".format(state.shared.mission, team_size)) 94 93 return AssembleTeam(shared, team_size) 95 94 … … 123 122 124 123 def perform_mission(): 125 nonlocal wins, losses , mission124 nonlocal wins, losses 126 125 127 126 failures = 0 … … 131 130 failures = failures + 1 132 131 133 success = failures < required_failures(state.shared.player_count, mission)132 success = failures < required_failures(state.shared.player_count, state.shared.mission) 134 133 135 134 for p in players:
Note: See TracChangeset
for help on using the changeset viewer.