Changeset 6.1.13
- Timestamp:
- 08/20/2016 06:23:44 PM (8 years ago)
- branch-nick:
- state
- revision id:
- dsowen@fugue88.ws-20160820182344-3ezuqi6hdojqqccs
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main.py
r6.1.12 r6.1.13 113 113 state = "ASSEMBLE_TEAM" 114 114 115 while True: 116 if state == "ASSEMBLE_TEAM": 117 assemble_team() 118 if approved: 119 team_failures = 0 120 state = "PERFORM_MISSION" 121 else: 122 team_failures += 1 115 elif state == "ASSEMBLE_TEAM": 116 assemble_team() 117 if approved: 118 team_failures = 0 119 state = "PERFORM_MISSION" 120 else: 121 team_failures += 1 123 122 124 125 126 127 128 123 if team_failures == 5: 124 print("The spies won!") 125 for p in players: 126 p.observe_game(False) 127 return 129 128 130 break 129 elif state == "PERFORM_MISSION": 130 team_failures = 0 131 perform_mission() 131 132 132 elif state == "PERFORM_MISSION": 133 team_failures = 0 134 perform_mission() 133 if wins >= 3: 134 print("The Resistance won!") 135 for p in players: 136 p.observe_game(True) 137 return 138 elif losses >= 3: 139 print("The Spies won!") 140 for p in players: 141 p.observe_game(False) 142 return 135 143 136 if wins >= 3: 137 print("The Resistance won!") 138 for p in players: 139 p.observe_game(True) 140 return 141 elif losses >= 3: 142 print("The Spies won!") 143 for p in players: 144 p.observe_game(False) 145 return 146 147 state = "ADVANCE_MISSIONS" 148 break 144 state = "ADVANCE_MISSIONS" 149 145 150 146
Note: See TracChangeset
for help on using the changeset viewer.