diff options
Diffstat (limited to 'example-bots/random.py')
-rw-r--r-- | example-bots/random.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/example-bots/random.py b/example-bots/random.py new file mode 100644 index 0000000..e61ff15 --- /dev/null +++ b/example-bots/random.py @@ -0,0 +1,11 @@ +import random + +def calculate_orders(whoami, state): + orders = [] + + my_robots = state.robots_by_player[whoami] + for robot in my_robots: + # Make a random move for each robot + orders.append(random.choice('ULDRP')) + + return orders |