Ignore:
Timestamp:
09/02/13 16:31:03 (8 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Phase:
public
Rebase:
63393636353839336261366531323765373462396633643337663138353262663165393862306138
Message:

Two switch puzzle!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/game_object.py

    r133 r140  
    5252    def get_state(self):
    5353        return self.glue.get_state_of(self._state_source)
     54
     55
     56class StateLogicalAndPuzzler(Puzzler):
     57    def __init__(self, *state_sources):
     58        self._state_sources = state_sources
     59
     60    def get_state(self):
     61        for state_source in self._state_sources:
     62            if not self.glue.get_state_of(state_source):
     63                return False
     64        return True
    5465
    5566
Note: See TracChangeset for help on using the changeset viewer.