diff options
author | Peter Ward <peteraward@gmail.com> | 2014-02-22 20:41:17 +1100 |
---|---|---|
committer | Peter Ward <peteraward@gmail.com> | 2014-02-22 20:41:17 +1100 |
commit | 4e6255791bc15d45624ee73d9011f2c522e583e3 (patch) | |
tree | a70a96c67bd5834b675761576b931cc9e7ba5ae9 /simple.py | |
parent | 342bdfdc64e0b7e1874e6e9280e1a2475cc6b8bb (diff) |
handle collisions
Diffstat (limited to 'simple.py')
-rw-r--r-- | simple.py | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -3,16 +3,15 @@ import robots def bot(whoami, players, board): my_robots = players[whoami]['robots'] - action = random.choice('UDLRP-') + action = random.choice('URP') return action * len(my_robots) if __name__ == '__main__': random.seed(64) - map_ = robots.empty_map(20, 20, 4) + map_ = robots.empty_map(10, 10, 4) game = robots.Game(map_) game.add_bot(bot, 'Alice') game.add_bot(bot, 'Bob') game.add_bot(bot, 'Charlie') - game.add_bot(bot, 'Doug') viewer = robots.CursesViewer(game) viewer.run() |