summaryrefslogtreecommitdiff
path: root/simple.py
diff options
context:
space:
mode:
Diffstat (limited to 'simple.py')
-rw-r--r--simple.py16
1 files changed, 3 insertions, 13 deletions
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)