summaryrefslogtreecommitdiff
path: root/template.py
blob: 194b1a5d56bd2e6f2419a1f6c97d3fc8d138fd74 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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()