diff options
author | Peter Ward <peteraward@gmail.com> | 2009-10-01 13:48:41 +1000 |
---|---|---|
committer | Peter Ward <peteraward@gmail.com> | 2009-10-01 13:48:41 +1000 |
commit | 986964a1a7940e98bd1746d67fbd836986c8aee3 (patch) | |
tree | 8966ad7182554f46fdaa8adcca4b3c22dff6d91d /pyglet_snake.py | |
parent | c26c4ba3e8a949aaf369b76a2ac1d3fba202c107 (diff) |
Added template file.
Diffstat (limited to 'pyglet_snake.py')
-rwxr-xr-x | pyglet_snake.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pyglet_snake.py b/pyglet_snake.py index e600c7f..4ad174e 100755 --- a/pyglet_snake.py +++ b/pyglet_snake.py @@ -10,6 +10,7 @@ pyglet.resource.reindex() from pyglet.gl import * +from common import * from snake import SnakeEngine def scale_aspect((source_width, source_height), (target_width, target_height)): @@ -103,6 +104,9 @@ class PygletSnakeEngine(SnakeEngine, pyglet.window.Window): pyglet.app.exit() super(PygletSnakeEngine, self).update_snakes(*args) + def run(self): + pyglet.app.run() + if __name__ == '__main__': from bots import * from oldbot import BotWrapper @@ -113,5 +117,5 @@ if __name__ == '__main__': game.add_bot(random_bounds_bot) game.add_bot(random_square_bot) game.add_bot(BotWrapper('oldbots/peter.py')) - pyglet.app.run() + game.run() |