예제 #1
0
        public override int CalculateScore(Army ForArmy, Match Match, Dictionary <Objective, int> Cache)
        {
            bool t = Invert ? Objective.GetScore(ForArmy, Match, Cache) <= Threshold
                                                                           : Objective.GetScore(ForArmy, Match, Cache) >= Threshold;

            return(t ? 1 : 0);
        }
        public override int CalculateScore(Army ForArmy, Match Match, Dictionary <Objective, int> Cache)
        {
            int turn = Match.CurrentTurn.TurnNumber == 0
                                                        ? Match.Scenario.TurnConfiguration.Turns + 1
                                                        : Match.CurrentTurn.TurnNumber;

            return(Objective.GetScore(ForArmy, Match, Cache) > 0 ? turn : int.MaxValue);
        }
        public override int CalculateScore(Army ForArmy, Match Match, Dictionary <Objective, int> Cache)
        {
            var score        = Metric.GetScore(ForArmy, Match, Cache);
            var compareScore = Match.Armies
                               .Where(i => i.Configuration.Team != ForArmy.Configuration.Team)
                               .Max(i => Metric.CalculateScore(i, Match, new Dictionary <Objective, int>()));

            return(score > compareScore ? 1 : 0);
        }
 public bool IsSatisfied(Army ForArmy, Match Match, Dictionary <Objective, int> Cache)
 {
     return(Invert ? Objective.GetScore(ForArmy, Match, Cache) <= Threshold
                                                                          : Objective.GetScore(ForArmy, Match, Cache) >= Threshold);
 }
예제 #5
0
 public override int CalculateScore(Army ForArmy, Match Match, Dictionary <Objective, int> Cache)
 {
     return(Numerator.GetScore(ForArmy, Match, Cache) / Denominator.GetScore(ForArmy, Match, Cache));
 }
예제 #6
0
 public override int CalculateScore(Army ForArmy, Match Match, Dictionary <Objective, int> Cache)
 {
     return(Points * Objective.GetScore(ForArmy, Match, Cache));
 }