Beispiel #1
0
        public void Test_no_ties()
        {
            var source = Rounds(R("1", "2", "3"), R("3", "1", "2"));
            var rating = new ScoreAggregator().Aggregate(source);

            rating.Count.Should().Be(3);
            rating[0].Check("1", 5, 3);
            rating[1].Check("3", 4, 2);
            rating[2].Check("2", 3, 1);
        }
Beispiel #2
0
    void Awake()
    {
        speaker         = GameObject.Find("speaker");
        scoreAggregator = GameObject.Find("agg").GetComponent <ScoreAggregator>();

        lock (scoreAggregator.myLock)
        {
            audienceNumber = scoreAggregator.numAudience;
            scoreAggregator.numAudience += 1;
        }
        loopTime = scoreAggregator.contactScoreLoopTime;
    }
Beispiel #3
0
        public void Test_tie_diff_positions()
        {
            var source = Rounds(
                R("1", "2", "3", "4", "5"),
                R("3", "5", "2", "1", "4"));
            var rating = new ScoreAggregator().Aggregate(source);

            rating.Count.Should().Be(5);
            rating[0].Check("3", 8, 5);
            rating[1].Check("1", 7, 4);
            rating[2].Check("2", 7, 3);
            rating[3].Check("5", 5, 2);
            rating[4].Check("4", 3, 1);
        }
Beispiel #4
0
        public void Test_tie_missed_rounds_three_both_in_last_round()
        {
            var source = Rounds(
                R("3", "1", "4"),
                R("2", "3", "4"),
                R("1", "2", "3"));
            var rating = new ScoreAggregator().Aggregate(source);

            rating.Count.Should().Be(4);
            rating[0].Check("3", 6, 4);
            rating[1].Check("1", 5, 3);
            rating[2].Check("2", 5, 2);
            rating[3].Check("4", 2, 1);
        }
Beispiel #5
0
        public void Test_tie_mirror_positions_missed_rounds()
        {
            var source = Rounds(
                R("1"),
                R("2"));
            var rating = new ScoreAggregator().Aggregate(source);

            rating.Count.Should().Be(2);
            rating[0].Check("2", 1, 2);
            rating[1].Check("1", 1, 1);
            source = Rounds(
                R("1", "3", "4"),
                R("2", "3", "4"));
            rating = new ScoreAggregator().Aggregate(source);
            rating.Count.Should().Be(4);
            rating[0].Check("3", 4, 4);
            rating[1].Check("2", 3, 3);
            rating[2].Check("1", 3, 2);
            rating[3].Check("4", 2, 1);
        }