- Mid-tier raid based on pest control.
- Takes place on various floating platforms in the void.
- Randomly spawns 4 boss platforms.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class State(object): | |
""" | |
We define a state object which provides some utility functions for the | |
individual states within the state machine. | |
""" | |
def __init__(self): | |
print 'Processing current state:', str(self) | |
def on_event(self, event): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from states import LockedState | |
class SimpleDevice(object): | |
""" | |
A simple state machine that mimics the functionality of a device from a | |
high level. | |
""" | |
def __init__(self): | |
""" Initialize the components. """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python | |
Python 2.7.13 (default, Apr 4 2017, 08:47:57) | |
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from simple_device import SimpleDevice | |
>>> device = SimpleDevice() | |
Processing current state: LockedState | |
>>> device.on_event('device_locked') | |
>>> device.on_event('pin_entered') | |
Processing current state: UnlockedState |
NewerOlder