public void DiceRoll()
 {
     IDiceRoll diceRoll = new DiceRoll {Values = new[] {1, 2, 3}};
     Assert.AreEqual(diceRoll.Sum, 6);
     Assert.IsFalse(diceRoll.IsSameValue);
     diceRoll = new DiceRoll { Values = new[] { 3, 3, 3 } };
     Assert.AreEqual(diceRoll.Sum, 9);
     Assert.IsTrue(diceRoll.IsSameValue);
 }
Exemple #2
0
        public IEnumerable<Fact> MakeAnExperiment(int iterationCount)
        {
            //gain experience
            var statistics = new DiceRoll[iterationCount];
            for (var i = 0; i < iterationCount; i++)
            {
                statistics[i] = DiceSystem.GetExperience();
            }
            //Analyze statistics
            var analyzer = new DiceRollAnalyzer();
            var facts = analyzer.Analyze(statistics);

            return facts;
        }