comparison 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
comparison
equal deleted inserted replaced
654:335db68e0db4 655:c77d6aa29bee
1 """The Custom state object for Suspended Sentence"""
2
3 from pyntnclick.state import GameState
4
5 class SSState(GameState):
6
7 def get_jim_state(self):
8 """Check JIM's health"""
9 return self['bridge']['ai status']
10
11 def loop_ai(self):
12 """Make JIM loopy"""
13 self['bridge']['ai status'] = 'looping'
14
15 def break_ai(self):
16 self['bridge']['ai status'] = 'dead'