From ace2ce54a4e947250dfbab0a14ef039f9c4db147 Mon Sep 17 00:00:00 2001 From: James Tocknell Date: Fri, 19 Sep 2014 17:46:11 +1000 Subject: Fixed capturer --- .hgignore | 4 ++++ capturer.py | 20 ++++---------------- 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() -- cgit v1.2.3