Mercurial > boomslang
changeset 661:5dc866e1d71d pyntnclick
Misc pep8 and pyflakes fixes
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sun, 12 Feb 2012 15:00:53 +0200 |
parents | dbec226debe3 |
children | 6daaeffb37d1 |
files | gamelib/ss_state.py pyntnclick/main.py pyntnclick/tools/rect_drawer.py |
diffstat | 3 files changed, 13 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/ss_state.py Sun Feb 12 14:48:47 2012 +0200 +++ b/gamelib/ss_state.py Sun Feb 12 15:00:53 2012 +0200 @@ -2,15 +2,16 @@ from pyntnclick.state import GameState + class SSState(GameState): - def get_jim_state(self): - """Check JIM's health""" - return self['bridge']['ai status'] + 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 loop_ai(self): + """Make JIM loopy""" + self['bridge']['ai status'] = 'looping' - def break_ai(self): - self['bridge']['ai status'] = 'dead' + def break_ai(self): + self['bridge']['ai status'] = 'dead'
--- a/pyntnclick/main.py Sun Feb 12 14:48:47 2012 +0200 +++ b/pyntnclick/main.py Sun Feb 12 15:00:53 2012 +0200 @@ -136,7 +136,7 @@ if self.constants.debug and opts.list_scenes: # FIXME: Horrible hack to avoid image loading issues for # now - display = pygame.display.set_mode(self.constants.screen, + pygame.display.set_mode(self.constants.screen, SWSURFACE) list_scenes(self.initial_state) sys.exit(0) @@ -144,7 +144,7 @@ if opts.scene is None: print 'Need to supply a scene to use the rect drawer' sys.exit(1) - display = make_rect_display() + make_rect_display() # FIXME: Remove Albow from here try: self.engine = RectEngine(self, self.initial_state, opts.scene,
--- a/pyntnclick/tools/rect_drawer.py Sun Feb 12 14:48:47 2012 +0200 +++ b/pyntnclick/tools/rect_drawer.py Sun Feb 12 15:00:53 2012 +0200 @@ -1,9 +1,6 @@ # Quickly hacked together helper for working out # interactive regions in Suspended Sentence -import sys -import os.path - # XXX: Threw away albow #from albow.root import RootWidget #from albow.utils import frame_rect @@ -677,6 +674,5 @@ def make_rect_display(): pygame.display.init() pygame.font.init() - return pygame.display.set_mode((constants.screen[0] - + constants.menu_width, - constants.screen[1])) + pygame.display.set_mode((constants.screen[0] + + constants.menu_width, constants.screen[1]))