public void RequestBot(Team team, AiHero hero, Difficulty difficulty, IBotRule rule, int minPlayersOnTeam, int maxPlayersOnTeam) { BotRequest newRequest = new BotRequest(team, hero, difficulty, rule, minPlayersOnTeam, maxPlayersOnTeam); _botRequests.Requests.Add(newRequest); }
internal BotRequest(Team team, AiHero hero, Difficulty difficulty, IBotRule rule, int minPlayersOnTeam, int maxPlayersOnTeam) { if (minPlayersOnTeam < 0 || minPlayersOnTeam > 5) { throw (new ArgumentOutOfRangeException(nameof(minPlayersOnTeam), "Must be in range 0 - 5 inclusive.")); } if (maxPlayersOnTeam < 0 || maxPlayersOnTeam > 5) { throw (new ArgumentOutOfRangeException(nameof(maxPlayersOnTeam), "Must be in range 0 - 5 inclusive.")); } if (minPlayersOnTeam > maxPlayersOnTeam) { throw (new ArgumentOutOfRangeException(nameof(minPlayersOnTeam), "Must not be greater than maxPlayers")); } BotTeam = team; Hero = hero; Difficulty = difficulty; Rule = rule; MinPlayersOnTeam = minPlayersOnTeam; MaxPlayersOnTeam = maxPlayersOnTeam; }
private bool GetRuleIsFollowed(IBotRule rule, Team team) { return(rule.FollowsRule(team, _slots)); }
public void RequestBot(AiHero hero, Difficulty difficulty, IBotRule rule, int minPlayersOnTeam, int maxPlayersOnTeam) { RequestBot(Team.Blue, hero, difficulty, rule, minPlayersOnTeam, maxPlayersOnTeam); RequestBot(Team.Red, hero, difficulty, rule, minPlayersOnTeam, maxPlayersOnTeam); }
public void RequestBot(Team team, AiHero hero, Difficulty difficulty, IBotRule rule) { RequestBot(team, hero, difficulty, rule, _defaultMinPlayersOnTeam, _defaultMaxPlayersOnTeam); }
public void RequestBot(AiHero hero, Difficulty difficulty, IBotRule rule) { RequestBot(Team.Blue, hero, difficulty, rule); RequestBot(Team.Red, hero, difficulty, rule); }