summaryrefslogtreecommitdiff
path: root/template.py
diff options
context:
space:
mode:
Diffstat (limited to 'template.py')
-rw-r--r--template.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/template.py b/template.py
new file mode 100644
index 0000000..194b1a5
--- /dev/null
+++ b/template.py
@@ -0,0 +1,15 @@
+from pyglet_snake import PygletSnakeEngine
+
+def your_name_here_bot(board, position):
+ x, y = position
+ mychar = board[y][x]
+ return 'U'
+
+# Test code to run the snake game.
+# Leave the if statement as is, otherwise I won't be able to run your bot with
+# the other bots.
+if __name__ == '__main__':
+ p = PygletSnakeEngine(25, 25, 10)
+ p.add_bot(your_name_here_bot)
+ p.run()
+