summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()