From 653230c727417861d7592bebee5773df0c5efe3f Mon Sep 17 00:00:00 2001 From: Peter Ward Date: Fri, 20 Jul 2012 00:16:34 +1000 Subject: slow the frame rate a little, fix a bug. --- snakegame/engines/base.py | 2 +- snakegame/engines/pyglet.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/snakegame/engines/base.py b/snakegame/engines/base.py index f6bb9e9..0d3d782 100644 --- a/snakegame/engines/base.py +++ b/snakegame/engines/base.py @@ -83,7 +83,7 @@ class Engine(object): for row in self.board: for x, cell in enumerate(row): if cell.lower() == letter: - row[x] = Squares.EMPTY + row[x] = common.EMPTY bot = self.bots[letter] del self.bots[letter] diff --git a/snakegame/engines/pyglet.py b/snakegame/engines/pyglet.py index bff48ac..5c9e976 100644 --- a/snakegame/engines/pyglet.py +++ b/snakegame/engines/pyglet.py @@ -32,7 +32,7 @@ class PygletEngine(Engine, pyglet.window.Window): gl.glEnable(gl.GL_BLEND) gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA) - pyglet.clock.schedule_interval(lambda t: self.update_snakes(), 0.025) + pyglet.clock.schedule_interval(lambda t: self.update_snakes(), 1/30.0) def new_game(self, rows, columns, n_apples): super(PygletEngine, self).new_game(rows, columns, n_apples) -- cgit v1.2.3