diff options
author | Peter Ward <pwar3236@usyd.edu.au> | 2010-01-05 07:07:10 +1100 |
---|---|---|
committer | Peter Ward <pwar3236@usyd.edu.au> | 2010-01-05 07:07:10 +1100 |
commit | 2ee7eaba813ffaca6a3715d8bc7cf25d854af835 (patch) | |
tree | 75c65ec409daa2be620baf96084c8fa46c8bef36 /pyglet_snake.py | |
parent | f788bdcf63d14dd97f0802391b0676ca84c900ce (diff) |
Gave common arg formatting.
Diffstat (limited to 'pyglet_snake.py')
-rwxr-xr-x | pyglet_snake.py | 12 |
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() |