Ignore:
Timestamp:
09/05/13 14:10:57 (8 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Phase:
public
Message:

Toggle switch, sans art.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/puzzle.py

    r235 r282  
    7878
    7979
     80class ParentAttrPuzzler(Puzzler):
     81    def __init__(self, attr_name):
     82        self._attr_name = attr_name
     83
     84    def get_state(self):
     85        return getattr(self.game_object, self._attr_name)
     86
     87    @classmethod
     88    def requires(cls):
     89        return [("name", "string"), ("attr_name", "string")]
     90
     91
    8092class StateProxyPuzzler(Puzzler):
    8193    def __init__(self, state_source):
Note: See TracChangeset for help on using the changeset viewer.