Changeset 6.1.30
- Timestamp:
- 08/20/2016 09:02:02 PM (8 years ago)
- branch-nick:
- state
- revision id:
- dsowen@fugue88.ws-20160820210202-rikfzsb5dytg46gz
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main.py
r6.1.29 r6.1.30 38 38 class Shared(object): 39 39 40 def __init__(self ):41 pass40 def __init__(self, player_count): 41 self.player_count = player_count 42 42 43 43 … … 78 78 players[i].reveal_spies(spy_nums) 79 79 80 shared = Shared( )80 shared = Shared(player_count) 81 81 82 82 wins = 0 … … 88 88 89 89 def advance_mission(): 90 team_size = mission_size( player_count, mission)90 team_size = mission_size(state.shared.player_count, mission) 91 91 print("Mission {} needs {} members".format(mission, team_size)) 92 92 return AssembleTeam(shared, team_size) … … 105 105 print("Team {}: {} for, {} against".format( 106 106 {True: "approved", False: "rejected"}[approved], 107 approvals, player_count - approvals107 approvals, state.shared.player_count - approvals 108 108 )) 109 109 … … 111 111 p.observe_team_vote(approved, votes) 112 112 113 captain = (captain + 1) % player_count113 captain = (captain + 1) % state.shared.player_count 114 114 115 115 if approved: … … 129 129 failures = failures + 1 130 130 131 success = failures < required_failures( player_count, mission)131 success = failures < required_failures(state.shared.player_count, mission) 132 132 133 133 for p in players:
Note: See TracChangeset
for help on using the changeset viewer.