From 384c43a55bff6bd936bcbdba9bfca37ebdf72e43 Mon Sep 17 00:00:00 2001 From: Peter Ward Date: Wed, 17 Sep 2014 10:07:57 +1000 Subject: implement a terrible bot chooser --- simple.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'simple.py') diff --git a/simple.py b/simple.py index f8a7edd..1ff37f2 100644 --- a/simple.py +++ b/simple.py @@ -1,4 +1,5 @@ import random +import sys import robots @@ -10,6 +11,9 @@ def random_walk(whoami, state): ) if __name__ == '__main__': + name, = sys.argv[1:] server = robots.Server() - server.add_simple_bot(random_walk, 'Alice') + server.SERVER_NAME = name + server.add_simple_bot(random_walk, 'Bot1') + server.add_simple_bot(random_walk, 'Bot2') server.run() -- cgit v1.2.3