Changeset 6.1.43


Ignore:
Timestamp:
08/21/2016 04:03:40 AM (8 years ago)
Author:
David Owen <dsowen@fugue88.ws>
branch-nick:
state
revision id:
dsowen@fugue88.ws-20160821040340-f51ivyo0n3o2ip7c
Message:

Copied role_deck to shared state

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main.py

    r6.1.42 r6.1.43  
    3838class Shared(object):
    3939
    40     def __init__(self, player_count, players):
     40    def __init__(self, player_count, players, role_deck):
    4141        self.player_count = player_count
    4242        self.players = players
     43        self.role_deck = role_deck
    4344        self.mission = 0
    4445        self.captain = 0
     
    117118            players[i].reveal_spies(spy_nums)
    118119
    119     shared = Shared(player_count, players)
     120    shared = Shared(player_count, players, role_deck)
    120121
    121122    def perform_mission():
    122123        failures = 0
    123124        for i in state.team:
    124             if role_deck[i] == "SPY":
     125            if state.shared.role_deck[i] == "SPY":
    125126                if not state.shared.players[i].perform_mission():
    126127                    failures = failures + 1
Note: See TracChangeset for help on using the changeset viewer.