Пример #1
0
def main():

    assert version_info[0] == 3, "You should run me with Python 3.x"

    dds = DirectionSolver()
    wcl = WebClient(dds)

    wcl.run("ws://tetrisj.jvmhost.net:12270/codenjoy-contest/ws", 'au')
Пример #2
0
def main():

    assert version_info[0] == 3, "You should run me with Python 3.x"

    dds = DirectionSolver()
    wcl = WebClient(dds)

    wcl.run("ws://codenjoy.com:80/codenjoy-contest/ws", 'au')
Пример #3
0
def main():

    dds = DirectionSolver()
    wcl = WebClient(dds)

    server = 'ws://localhost:8080/codenjoy-contest/ws'
    user = '******'
    code = '1351323692637632922'
    wcl.run(server, user, code)
Пример #4
0
def main():
    assert version_info[0] == 3, "You should run me with Python 3.x"

    # substitute following link with the one you've copied in your browser after registration
    url = "https://dojorena.io/codenjoy-contest/board/player/8aq9izxu40h7blnrd3l9?code=6712803793075447834&gameName=bomberman"
    direction_solver = DirectionSolver()

    wcl = WebClient(url=get_url_for_ws(url), solver=direction_solver)
    wcl.run_forever()
Пример #5
0
def main():
    assert version_info[0] == 3, "You should run me with Python 3.x"

    # substitute following link with the one you've copied in your browser after registration
    url = "http://3.133.109.198:8080//codenjoy-contest/board/player/g2kzb99qhnjs217fkcyy?code=3689161262388400247&gameName=bomberman"
    direction_solver = DirectionSolver()

    print(get_url_for_ws(url))
    wcl = WebClient(url=get_url_for_ws(url), solver=direction_solver)
    wcl.run_forever()
Пример #6
0
def main():
    assert version_info[0] == 3, "You should run me with Python 3.x"

    config_init()
    if QT_BOARD_SHOW:
        qt_create_board()

    # substitute following link with the one you've copied in your browser after registration

    direction_solver = DirectionSolver()

    if DEBUG:
        board_string = "".join("".join(b) for b in BOARDDEBUG)
        direction_solver.get(board_string)

    else:
        url = REMOTE_URL
        wcl = WebClient(url=get_url_for_ws(url), solver=direction_solver)
        wcl.run_forever()
Пример #7
0
def main():

    assert version_info[0] == 3, "You should run me with Python 3.x"

    dds = DirectionSolver()
    wcl = WebClient(dds)

    user = '******'
    code = '0000000000000000000'

    wcl.run("ws://host:port/codenjoy-contest/ws", user, code)
Пример #8
0
def main():
    assert version_info[0] == 3, "You should run me with Python 3.x"

    # substitute following link with the one you've copied in your browser after registration
    url = "http://codenjoy.com:80/codenjoy-contest/board/player/3edq63tw0bq4w4iem7nb?code=12345678901234567890"

    repattern = re.compile(
        "^https?://([-a-zA-Z0-9@:%._\+~#=\.]+)/codenjoy-contest/board/player/([a-z0-9]+)\?code=([0-9]+)"
    )
    rematch = repattern.match(url)
    serverandport = rematch.group(1)
    username = rematch.group(2)
    usercode = rematch.group(3)

    dds = DirectionSolver()
    wcl = WebClient(dds)

    wcl.run(serverandport, username, usercode)