예제 #1
0
def main():
    # Ladder game started by LadderManager
    print("Starting ladder game...")
    result, opponentid = run_ladder_game(my_bot)
    print(result, " against opponent ", opponentid)
예제 #2
0
    '(2)RedshiftLE'
]

races = [Race.Protoss, Race.Terran, Race.Zerg]

difficulties = [
    Difficulty.VeryEasy, Difficulty.Easy, Difficulty.Medium,
    Difficulty.MediumHard, Difficulty.Hard, Difficulty.Harder,
    Difficulty.VeryHard, Difficulty.CheatVision, Difficulty.CheatMoney,
    Difficulty.CheatInsane
]

selected_map = sample(maps, k=1)[0]
race = sample(races, k=1)[0]
difficulty = difficulties[6]

if __name__ == '__main__':
    if "--LadderServer" in sys.argv:
        # tapioca = TapiocaBot()
        tapioca = TapiocaBot(verbose=True, visual_debug=True)
        bot = Bot(Race.Protoss, tapioca)
        print("Starting ladder game...")
        run_ladder_game(bot)
    else:
        print("Starting local game...")
        tapioca = TapiocaBot(verbose=True, visual_debug=True)
        bot = Bot(Race.Protoss, tapioca)
        sc2.run_game(sc2.maps.get(selected_map),
                     [bot, Computer(race, difficulty)],
                     realtime=False)