summaryrefslogtreecommitdiff
path: root/pyglet_snake.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyglet_snake.py')
-rwxr-xr-xpyglet_snake.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/pyglet_snake.py b/pyglet_snake.py
index 2ef11a8..3d3cfc1 100755
--- a/pyglet_snake.py
+++ b/pyglet_snake.py
@@ -108,13 +108,13 @@ class PygletSnakeEngine(SnakeEngine, pyglet.window.Window):
pyglet.app.run()
if __name__ == '__main__':
- from bots import random_bounds_bot, random_square_bot
+ import sys
from processbot import BotWrapper
- game = PygletSnakeEngine(25, 25, 50, results=True)
- game.add_bot(random_bounds_bot)
- game.add_bot(random_square_bot)
- for i in xrange(2):
- game.add_bot(BotWrapper('bots/peter.py'))
+ rows, columns, apples = map(int, sys.argv[1:4])
+ game = PygletSnakeEngine(rows, columns, apples)
+ for filename in sys.argv[4:]:
+ bot = BotWrapper(filename)
+ game.add_bot(bot)
game.run()