summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Ward <peteraward@gmail.com>2012-07-20 00:16:34 +1000
committerPeter Ward <peteraward@gmail.com>2012-07-20 00:16:34 +1000
commit653230c727417861d7592bebee5773df0c5efe3f (patch)
tree5538e86d170b4a733fe9bacc392a7907160b3caf
parent6916ec3e381aba2d1d3c44e5ee2a66047c73d8e8 (diff)
slow the frame rate a little, fix a bug.
-rw-r--r--snakegame/engines/base.py2
-rw-r--r--snakegame/engines/pyglet.py2
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)