summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Tocknell <aragilar@gmail.com>2014-09-19 17:46:11 +1000
committerJames Tocknell <aragilar@gmail.com>2014-09-19 17:46:11 +1000
commitace2ce54a4e947250dfbab0a14ef039f9c4db147 (patch)
tree6cb55b0e36d82f71d7f09df20366757e085c4583
parent4e50f0d2a26d34453aa15cffd307278532ba1baa (diff)
Fixed capturer
-rw-r--r--.hgignore4
-rw-r--r--capturer.py20
2 files changed, 8 insertions, 16 deletions
diff --git a/.hgignore b/.hgignore
index e21f17c..5d9d8a5 100644
--- a/.hgignore
+++ b/.hgignore
@@ -1,3 +1,7 @@
syntax: glob
*~
*.py[co]
+robots.egg*
+*.c
+*.o
+*.so
diff --git a/capturer.py b/capturer.py
index 7a698ee..54b0be6 100644
--- a/capturer.py
+++ b/capturer.py
@@ -46,19 +46,7 @@ class CaptureSpawns(object):
return results
if __name__ == '__main__':
-# random.seed(42)
- map_ = robots.border_map(40, 30, 0)
-
- add_spawns(map_, 300, 'X')
- add_spawns(map_, 20, '+')
-
- for y in range(20):
- map_[y][20] = 'X'
-
- add_spawns(map_, 6)
-
- game = robots.Game(map_)
- game.add_bot(CaptureSpawns(variance=0), 'Alice')
- game.add_bot(CaptureSpawns(variance=0.01), 'Bob')
- viewer = robots.CursesViewer(game)
- viewer.run()
+ server = robots.Server()
+ server.SERVER_NAME = 'Capturer Server'
+ server.add_bot(CaptureSpawns, 'Capture')
+ server.run()