Beispiel #1
0
 public void SetVictoryCondition(VictoryCondition Condition, Army ForArmy, Match Match)
 {
     _Display.Clear();
     foreach (var objective in Condition.Scorers)
     {
         _Display.Add(
             new Button("objective-header")
         {
             DisplayedString =
                 string.Format(
                     "{0}/{1}",
                     objective.CalculateScore(ForArmy, Match, new Dictionary <Objective, int>()),
                     Condition.GetMaximumScore(objective, ForArmy, Match))
         });
         _Display.Add(
             new Button("objective-regular")
         {
             DisplayedString =
                 ObjectDescriber.Sentencify(
                     ObjectiveDescriber.RemoveScore(ObjectiveDescriber.Describe(objective)))
         });
     }
 }
 public static string Describe(ObjectiveSuccessTrigger Trigger)
 {
     return(Sentencify(
                ObjectiveDescriber.Describe(
                    new TriggerObjective(Trigger.Objective, Trigger.Threshold, Trigger.Invert))));
 }