Beispiel #1
0
        public void GetScore_ThreeCherriesOnTheThreeLines_ReturnZero()
        {
            var builder = new WinLinesBuilder(_helper.SymbolMapWithThreeCherries);
            var rules   = new SevenRules(ref builder);
            var result  = rules.GetScore();

            Assert.That(result, Is.EqualTo(0));
        }
        public Score Calculate(SymbolMap map)
        {
            var score = 0;

            var winLinesBuilder = new WinLinesBuilder(map);

            score += new CherryRules(ref winLinesBuilder).GetScore();
            score += new SevenRules(ref winLinesBuilder).GetScore();
            score += new BarRules(ref winLinesBuilder).GetScore();
            score += new CombinationRules(ref winLinesBuilder).GetScore();

            return(new Score {
                Value = score
            });
        }