diff options
-rw-r--r-- | snakegame/engines/curses.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/snakegame/engines/curses.py b/snakegame/engines/curses.py index 1d93c0b..715f321 100644 --- a/snakegame/engines/curses.py +++ b/snakegame/engines/curses.py @@ -1,3 +1,5 @@ +from __future__ import absolute_import + import curses from functools import wraps import time @@ -5,12 +7,6 @@ import time from snakegame import common from snakegame.engines import Engine -def curses_wrapper(fn): - @wraps(fn) - def deco(*args, **kwargs): - return curses.wrapper(fn, *args, **kwargs) - return deco - class CursesEngine(Engine): def new_game(self, *args): super(CursesEngine, self).new_game(*args) @@ -33,7 +29,7 @@ class CursesEngine(Engine): colour = self.EMPTY_COLOUR # Draw the things on the square. - if cell == Squares.APPLE: + if cell == common.APPLE: char = '@' colour = self.APPLE_COLOUR @@ -44,7 +40,6 @@ class CursesEngine(Engine): self.window.addstr(y, x, char, colour) - @curses_wrapper def run(self): while self.bots: # Clear the screen. |