Пример #1
0
def move():
    data = request.json
    board = Board(data["board"])
    brain = Brain(data["you"]["id"], board)

    decision = brain.get_decision()
    print(decision)
    return api.move_response(decision)
Пример #2
0
def move():
    data = request.json
    print('Move data:')
    pprint(data)
    board = Board(data["board"])
    brain = Brain(data["you"]["id"], board)

    decision = brain.get_decision()
    print("Turn: ", data["turn"], "; snake_id: ", data["you"]["id"],
          "; made the decision to go ", decision)
    return api.move_response(decision)