Changeset 6.1.27


Ignore:
Timestamp:
08/20/2016 08:52:19 PM (8 years ago)
Author:
David Owen <dsowen@fugue88.ws>
branch-nick:
state
revision id:
dsowen@fugue88.ws-20160820205219-diosjgt18z0rtube
Message:

Added empty shared state

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main.py

    r6.1.26 r6.1.27  
    3636
    3737
     38class Shared(object):
     39
     40    def __init__(self):
     41        pass
     42
     43
    3844class AdvanceMission(object):
    39     pass
     45
     46    def __init__(self, shared):
     47        self.shared = shared
    4048
    4149
    4250class AssembleTeam(object):
    43     pass
     51
     52    def __init__(self, shared):
     53        self.shared = shared
    4454
    4555
    4656class PerformMission(object):
    47     pass
     57
     58    def __init__(self, shared):
     59        self.shared = shared
    4860
    4961
     
    6577            players[i].reveal_spies(spy_nums)
    6678
     79    shared = Shared()
     80
    6781    wins = 0
    6882    losses = 0
     
    7892        team_size = mission_size(player_count, mission)
    7993        print("Mission {} needs {} members".format(mission, team_size))
    80         return AssembleTeam()
     94        return AssembleTeam(shared)
    8195
    8296    def assemble_team():
     
    103117        if approved:
    104118            team_failures = 0
    105             return PerformMission()
     119            return PerformMission(shared)
    106120        else:
    107121            team_failures += 1
    108             return AssembleTeam()
     122            return AssembleTeam(shared)
    109123
    110124    def perform_mission():
     
    130144
    131145        mission += 1
    132         return AdvanceMission()
     146        return AdvanceMission(shared)
    133147
    134     state = AdvanceMission()
     148    state = AdvanceMission(shared)
    135149
    136150    while True:
Note: See TracChangeset for help on using the changeset viewer.