Esempio n. 1
0
 private void EvaluateScore(int championScore, int challengerScore, Score2 challenger)
 {
     if (championScore < challengerScore)
     {
         challenger.IncreaseScore();
     }
 }
Esempio n. 2
0
        public void ShouldCompareObjectTouples2_2()
        {
            Score2 scoreA = new Score2(1, 6, 7);
            Score2 scoreB = new Score2(3, 6, 10);

            scoreA.ScoreAgainstAnother(scoreB);
            scoreB.ScoreAgainstAnother(scoreA);

            string actual = $"{scoreA.MyScore()} {scoreB.MyScore()}";

            actual.Should().Be("0 2");
        }
Esempio n. 3
0
 private void EvaluateAgainstOpponent(int a, int b, int c, Score2 opponent)
 {
     EvaluateScore(_a, a, opponent);
     EvaluateScore(_b, b, opponent);
     EvaluateScore(_c, c, opponent);
 }
Esempio n. 4
0
 public void ScoreAgainstAnother(Score2 challenger)
 {
     challenger.EvaluateAgainstOpponent(_a, _b, _c, challenger);
 }