Ignore:
Timestamp:
Sep 2, 2013, 4:31:03 PM (7 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
rebase_source:
c9665893ba6e127e74b9f3d37f1852bf1e98b0a8
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.