Пример #1
0
def make_match_config_with_nombot() -> MatchConfig:
    # Makes a config which only has our bot in it.
    match_config = make_empty_match_config()
    match_config.player_configs = [
        make_defendinator_player_config(Team.BLUE),
    ]
    return match_config
Пример #2
0
def versus_line_goalie_match_config(attacker: Path, goalie: Path = BotConfigs.line_goalie) -> MatchConfig:
    match_config = make_empty_match_config()
    match_config.player_configs = [
        PlayerConfig.bot_config(attacker, Team.ORANGE),
        PlayerConfig.bot_config(goalie, Team.BLUE),
    ]
    return match_config
Пример #3
0
def make_match_config_with_my_bot() -> MatchConfig:
    # Makes a config which only has our bot in it for now.
    # For more defails: https://youtu.be/uGFmOZCpel8?t=375
    match_config = make_empty_match_config()
    match_config.player_configs = [
        PlayerConfig.bot_config(
            Path(__file__).absolute().parent.parent / 'bean.cfg', Team.BLUE),
    ]
    return match_config
def make_match_config_with_my_bot(name) -> MatchConfig:
    # Makes a config which only has our bot in it for now.
    # For more defails: https://youtu.be/uGFmOZCpel8?t=375
    match_config = make_empty_match_config()
    match_config.player_configs = [
        PlayerConfig.bot_config(
            Path(__file__).absolute().parent.parent / 'rashBot' / 'rashBot.cfg', #            Path(__file__).absolute().parent.parent / 'stick' / 'stick.cfg',
            Team.BLUE
        )
    ]
    match_config.player_configs[0].name = name
    return match_config
Пример #5
0
def make_kickoff_config(
        other_bot: PlayerConfig,
        bot_thats_supposed_to_win: PlayerConfig = None) -> MatchConfig:
    if bot_thats_supposed_to_win is None:
        bot_thats_supposed_to_win = make_defendinator_player_config(Team.BLUE)
    bot_thats_supposed_to_win.team = Team.BLUE.value
    other_bot.team = Team.ORANGE.value

    match_config = make_empty_match_config()
    match_config.player_configs = [
        bot_thats_supposed_to_win,
        other_bot,
    ]
    return match_config
Пример #6
0
def make_default_playlist():
    exercises = ([
        SpawnLocationExercise(name="SpawnLocationExercise"),
        SpawnLocationExercise(name="SpawnLocationExercise"),
        SpawnLocationExercise(name="SpawnLocationExercise"),
        # SpawnLocationExercise(name="SpawnLocationExercise"),
        # SpawnLocationExercise(name="SpawnLocationExercise"),
    ])
    for exercise in exercises:
        match_config = make_empty_match_config()
        match_config.player_configs = [
            # RocketLeague doesn't like being started without any players.
            PlayerConfig.bot_config(BotConfigs.brick_bot, Team.BLUE),
        ]
        match_config.mutators.respawn_time = '3 Seconds'
        match_config.instant_start = False
        exercise.match_config = match_config

    return exercises
Пример #7
0
 def set_bot(self, cfg_file: str):
     self.match_config = make_empty_match_config()
     self.match_config.player_configs = [
         PlayerConfig.bot_config(Path(cfg_file), Team.BLUE),
     ]