Пример #1
0
        public void TestZeros()
        {
            // arrange
            ScoreGame bGame = new ScoreGame(new[] { 0, 0, 0 });
            ScoreGame aGame = new ScoreGame(new[] { 0, 0, 0 });

            // act
            string result = bGame.Score(aGame);

            // assert
            Assert.AreEqual("0 0", result);
        }
Пример #2
0
 public string Score(ScoreGame other) => $"{ScoreAgainstAnother(this, other)} {ScoreAgainstAnother(other, this)}";
Пример #3
0
 private int ScoreAgainstAnother(ScoreGame one, ScoreGame two) => _scoreArray.Where((t, index) => one._scoreArray[index] > two._scoreArray[index]).Count();