Changeset 6.1.25


Ignore:
Timestamp:
08/20/2016 08:46:48 PM (8 years ago)
Author:
David Owen <dsowen@fugue88.ws>
branch-nick:
state
revision id:
dsowen@fugue88.ws-20160820204648-w2xyagebfu9y0f4i
Message:

Objectify state

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main.py

    r6.1.24 r6.1.25  
    4040
    4141
     42class AssembleTeam(object):
     43    pass
     44
     45
    4246def main(player_count):
    4347    spy_count = spies_for_players(player_count)
     
    7074        team_size = mission_size(player_count, mission)
    7175        print("Mission {} needs {} members".format(mission, team_size))
    72         return "ASSEMBLE_TEAM"
     76        return AssembleTeam()
    7377
    7478    def assemble_team():
     
    98102        else:
    99103            team_failures += 1
    100             return "ASSEMBLE_TEAM"
     104            return AssembleTeam()
    101105
    102106    def perform_mission():
     
    129133        if isinstance(state, AdvanceMission):
    130134            state = advance_mission()
    131         elif state == "ASSEMBLE_TEAM":
     135        elif isinstance(state, AssembleTeam):
    132136            state = assemble_team()
    133137        elif state == "PERFORM_MISSION":
Note: See TracChangeset for help on using the changeset viewer.