- Timestamp:
- 08/20/2016 08:52:19 PM (8 years ago)
- branch-nick:
- state
- revision id:
- dsowen@fugue88.ws-20160820205219-diosjgt18z0rtube
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main.py
r6.1.26 r6.1.27 36 36 37 37 38 class Shared(object): 39 40 def __init__(self): 41 pass 42 43 38 44 class AdvanceMission(object): 39 pass 45 46 def __init__(self, shared): 47 self.shared = shared 40 48 41 49 42 50 class AssembleTeam(object): 43 pass 51 52 def __init__(self, shared): 53 self.shared = shared 44 54 45 55 46 56 class PerformMission(object): 47 pass 57 58 def __init__(self, shared): 59 self.shared = shared 48 60 49 61 … … 65 77 players[i].reveal_spies(spy_nums) 66 78 79 shared = Shared() 80 67 81 wins = 0 68 82 losses = 0 … … 78 92 team_size = mission_size(player_count, mission) 79 93 print("Mission {} needs {} members".format(mission, team_size)) 80 return AssembleTeam( )94 return AssembleTeam(shared) 81 95 82 96 def assemble_team(): … … 103 117 if approved: 104 118 team_failures = 0 105 return PerformMission( )119 return PerformMission(shared) 106 120 else: 107 121 team_failures += 1 108 return AssembleTeam( )122 return AssembleTeam(shared) 109 123 110 124 def perform_mission(): … … 130 144 131 145 mission += 1 132 return AdvanceMission( )146 return AdvanceMission(shared) 133 147 134 state = AdvanceMission( )148 state = AdvanceMission(shared) 135 149 136 150 while True:
Note: See TracChangeset
for help on using the changeset viewer.