private void AddRequestIfRelevant(BotRequest request, Team team) { if (RequestIsRelevant(request, team)) { Expectations[team].Add(request); } }
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); }
private bool RequestIsRelevant(BotRequest request, Team team) { bool requestIsOnCorrectTeam = request.BotTeam == team; bool playerCountInRange = _slots.Players.Count(team) >= request.MinPlayersOnTeam && _slots.Players.Count(team) <= request.MaxPlayersOnTeam; bool ruleFollowed = GetRuleIsFollowed(request.Rule, team); return(requestIsOnCorrectTeam && playerCountInRange && ruleFollowed); }
public void AddBot(BotRequest request) { AddBot(request.Hero, request.Difficulty, request.BotTeam); }