Ejemplo n.º 1
0
def improve_skill(bot, number_of_games):
    for i in range(number_of_games):
        print("IMPROVE ITERATION NUMBER " + str(i))
        model = CheckersGameModel()
        bot.model = model
        controller = CheckersBoardController(model=model, bot=bot)
        controller.bot_move_delay = 0
        controller.game_mode = GAME_MODES["proVSPro"]
        controller.should_show_bot_play_on_board = False
        controller.should_log_the_game_on_board = False
        controller.should_log_the_game = True
        controller.start_bot_play()
        while not controller.the_end:
            time.sleep(0.001)
        print()
        print()
Ejemplo n.º 2
0
def improve_skill(bot, number_of_games):
    for i in range(number_of_games):
        print("IMPROVE ITERATION NUMBER " + str(i))
        model = CheckersGameModel()
        bot.model = model
        controller = CheckersBoardController(model=model, bot=bot)
        controller.bot_move_delay = 0
        controller.game_mode = GAME_MODES["proVSPro"]
        controller.should_show_bot_play_on_board = False
        controller.should_log_the_game_on_board = False
        controller.should_log_the_game = True
        controller.start_bot_play()
        while not controller.the_end:
            time.sleep(0.001)
        print()
        print()
Ejemplo n.º 3
0
def checkers(game_bot):
    #Reserve it for demo usage
    #total = len(sys.argv)
    #cmd_args = str(sys.argv)
    #print ("The total numbers of args passed to the script: %d " % total)
    #print ("Args list: %s " % cmd_args)

    root = Tk()
    model = CheckersGameModel()
    game_bot.model = model
    controller = CheckersBoardController(model=model, bot=game_bot)
    controller.game_mode = GAME_MODES["playerVSPro"]
    controller.bot_move_delay = 0.3
    controller.should_show_bot_play_on_board = True
    controller.should_log_the_game = True
    app = BoardCommonUI(master=root, controller=controller)
    controller.fill_board()
    if controller.game_mode == GAME_MODES["proVSPro"]:
        controller.start_bot_play()

    root.mainloop()
Ejemplo n.º 4
0
def checkers(game_bot):
    #Reserve it for demo usage
    #total = len(sys.argv)
    #cmd_args = str(sys.argv)
    #print ("The total numbers of args passed to the script: %d " % total)
    #print ("Args list: %s " % cmd_args)

    root = Tk()
    model = CheckersGameModel()
    game_bot.model = model
    controller = CheckersBoardController(model=model, bot=game_bot)
    controller.game_mode = GAME_MODES["playerVSPro"]
    controller.bot_move_delay = 0.3
    controller.should_show_bot_play_on_board = True
    controller.should_log_the_game = True
    app = BoardCommonUI(master=root, controller=controller)
    controller.fill_board()
    if controller.game_mode == GAME_MODES["proVSPro"]:
        controller.start_bot_play()

    root.mainloop()