Mercurial > boomslang
view gamelib/ss_state.py @ 655:c77d6aa29bee pyntnclick
Some code to kinda demonstrate the ever so cunning state handling plan
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sun, 12 Feb 2012 13:56:59 +0200 |
parents | |
children | 5dc866e1d71d |
line wrap: on
line source
"""The Custom state object for Suspended Sentence""" from pyntnclick.state import GameState class SSState(GameState): def get_jim_state(self): """Check JIM's health""" return self['bridge']['ai status'] def loop_ai(self): """Make JIM loopy""" self['bridge']['ai status'] = 'looping' def break_ai(self): self['bridge']['ai status'] = 'dead'