public ScoreResult(Score redOffensive, Score redDefensive, Score blueOffensive, Score blueDefensive, double points, Activity story)
 {
     RedOffensive = redOffensive;
     RedDefensive = redDefensive;
     BlueOffensive = blueOffensive;
     BlueDefensive = blueDefensive;
     Points = points;
     Story = story;
 }
 private void AddActivity(Activity activity)
 {
     _activitites.Add(activity);
     _signaler.Signal();
 }
Exemplo n.º 3
0
 public void UpdateScore(double score, Activity activity, bool winner, bool isOffence)
 {
     Score = score;
     ScoreHistory.Enqueue(new Tuple<double, Activity>(score, activity));
     if (winner)
     {
         Total.AddVictory();
         _winning.Add();
         _loosing.Reset();
         if (isOffence)
         {
             Offensive.AddVictory();
         }
         else
         {
             Defensive.AddVictory();
         }
     }
     else
     {
         Total.AddDefeat();
         _winning.Reset();
         _loosing.Add();
         if (isOffence)
         {
             Offensive.AddDefeat();
         }
         else
         {
             Defensive.AddDefeat();
         }
     }
 }