示例#1
0
 private void AddRequestIfRelevant(BotRequest request, Team team)
 {
     if (RequestIsRelevant(request, team))
     {
         Expectations[team].Add(request);
     }
 }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
 public void AddBot(BotRequest request)
 {
     AddBot(request.Hero, request.Difficulty, request.BotTeam);
 }