From 58e37a1be5b257def98b5c86de84c068e21512df Mon Sep 17 00:00:00 2001 From: Peter Ward Date: Sun, 18 May 2014 10:31:48 +1000 Subject: things --- simple.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'simple.py') diff --git a/simple.py b/simple.py index 2876948..554016c 100644 --- a/simple.py +++ b/simple.py @@ -1,7 +1,6 @@ import random import robots -from robots.utils import add_spawns def random_walk(whoami, state): my_robots = state.robots_by_player[whoami] @@ -11,15 +10,6 @@ def random_walk(whoami, state): ) if __name__ == '__main__': -# random.seed(42) - map_ = robots.border_map(20, 10, 0) - - add_spawns(map_, 10, 'X') - add_spawns(map_, 20, '+') - add_spawns(map_, 4) - - game = robots.Game(map_) - game.add_bot(random_walk, 'Alice') - game.add_bot(random_walk, 'Bob') - viewer = robots.CursesViewer(game) - viewer.run() + server = robots.Server() + server.add_simple_bot(random_walk, 'Alice') + server.run(debug=True) -- cgit v1.2.3