Source

SnakeGame / docs / print_bot.py

Full commit
1
2
3
4
5
6
7
8
9
def print_bot(board, position):
    print position
    print board

if __name__ == '__main__':
    from snakegame.engines.pyglet import PygletEngine
    engine = PygletEngine(3, 4, 3)
    engine.add_bot(print_bot)
    engine.run()