Beispiel #1
0
def main(argv):
    from itertools import count
    args = parse_args(argv)

    shell = ADBShell()
    model = get_model(shell)
    ident = get_ident(shell)

    assistant = AndroidAssistant(shell, ident, OCR(model))

    if args.repeat:
        iterations = count(1)
    else:
        iterations = ['']

    for i, suffix in enumerate(iterations):
        if i >= 1:
            assistant.restart()
        if args.outdir:
            outdir = args.outdir + str(suffix)
            try:
                os.makedirs(outdir)
            except OSError:
                pass
            run_assistant(assistant.gen_board_disk(outdir, args.resume),
                          assistant.make_move, args.from_start)
        else:
            run_assistant(assistant.gen_board_mem(), assistant.make_move,
                          args.from_start)
Beispiel #2
0
def main(argv):
    from itertools import count
    args = parse_args(argv)

    client = wda.Client('http://localhost:8100')
    session = client.session('vo.threes.free')
    model = "iphone"

    assistant = IOSAssistant(client, session, OCR(model))

    if args.repeat:
        iterations = count(1)
    else:
        iterations = ['']

    for i, suffix in enumerate(iterations):
        if i >= 1:
            assistant.restart()
        if args.outdir:
            outdir = args.outdir + str(suffix)
            try:
                os.makedirs(outdir)
            except OSError:
                pass
            run_assistant(assistant.gen_board_disk(outdir, args.resume),
                          assistant.make_move, args.from_start)
        else:
            run_assistant(assistant.gen_board_mem(), assistant.make_move,
                          args.from_start)
def main(argv):
    from itertools import count
    args = parse_args(argv)

    if args.browser == 'firefox':
        from ffctrl import FirefoxRemoteControl
        if args.port is None:
            args.port = 32000
        ctrl = FirefoxRemoteControl(args.port)
    elif args.browser == 'chrome':
        from chromectrl import ChromeDebuggerControl
        if args.port is None:
            args.port = 9222
        ctrl = ChromeDebuggerControl(args.port)

    assistant = KeyboardWebAssistant(ctrl)

    if args.repeat:
        iterations = count(1)
    else:
        iterations = ['']

    for i, suffix in enumerate(iterations):
        if i >= 1:
            assistant.restart()
        run_assistant(assistant.gen_board(), assistant.make_move,
                      args.from_start)
def main(argv):
    from itertools import count
    args = parse_args(argv)

    shell = ADBShell()
    model = get_model(shell)
    ident = get_ident(shell)

    assistant = AndroidAssistant(shell, ident, OCR(model))

    if args.repeat:
        iterations = count(1)
    else:
        iterations = ['']

    for i,suffix in enumerate(iterations):
        if i >= 1:
            assistant.restart()
        if args.outdir:
            outdir = args.outdir + str(suffix)
            try:
                os.makedirs(outdir)
            except OSError:
                pass
            run_assistant(assistant.gen_board_disk(outdir, args.resume), assistant.make_move, args.from_start)
        else:
            run_assistant(assistant.gen_board_mem(), assistant.make_move, args.from_start)
def main(argv):
    from itertools import count
    args = parse_args(argv)

    print 'Welcome to the Threes! assistant. See README.md for help on input formats.'
    assistant = ManualAssistant()
    run_assistant(assistant.gen_board(), assistant.make_move, False)
Beispiel #6
0
def main(argv):
    from itertools import count
    args = parse_args(argv)

    print 'Welcome to the Threes! assistant. See README.md for help on input formats.'
    assistant = ManualAssistant()
    run_assistant(assistant.gen_board(), assistant.make_move, False)
def main(argv):
    from itertools import count
    args = parse_args(argv)

    if args.browser == 'firefox':
        from ffctrl import FirefoxRemoteControl
        if args.port is None:
            args.port = 32000
        ctrl = FirefoxRemoteControl(args.port)
    elif args.browser == 'chrome':
        from chromectrl import ChromeDebuggerControl
        if args.port is None:
            args.port = 9222
        ctrl = ChromeDebuggerControl(args.port)

    assistant = KeyboardWebAssistant(ctrl)

    if args.repeat:
        iterations = count(1)
    else:
        iterations = ['']

    for i,suffix in enumerate(iterations):
        if i >= 1:
            assistant.restart()
        run_assistant(assistant.gen_board(), assistant.make_move, args.from_start)
Beispiel #8
0
def rungame(args):
    model = args.pop(0)
    d = args.pop(0)
    if args:
        startpoint = os.path.basename(args[0])
    else:
        startpoint = None

    run_assistant(gen_board(OCR(model), d, startpoint), make_move)
Beispiel #9
0
def rungame(args):
    model = args.pop(0)
    d = args.pop(0)
    if args:
        startpoint = os.path.basename(args[0])
    else:
        startpoint = None

    run_assistant(gen_board(OCR(model), d, startpoint), make_move)