Exemplo n.º 1
0
        public int EngineShouldRetrieveCorrectFreeSpinCollapseMultiplier(int level, int iterations)
        {
            var config = new Configuration();

            var targetMultiplier = CollapsingBonusEngine.GetCollapseMultiplier(config.BonusConfig.FreeSpin.Multipliers, iterations);

            return(targetMultiplier);
        }
        public int EngineShouldRetrieveCorrectCollapseMultiplier(int level, int iterations)
        {
            var config      = new Configuration();
            var targetWheel = MainGameEngine.GetTargetWheel(level, config, false);

            var targetMultiplier = CollapsingBonusEngine.GetCollapseMultiplier(config.BonusConfig.Collapse.Multipliers, iterations);

            return(targetMultiplier);
        }
Exemplo n.º 3
0
        public void EngineShouldCreateCollapsingFreeSpinResultWithCorrectMultiplier(int level)
        {
            var config         = new Configuration();
            var freeSpinResult = GenerateWinningFreeSpinResult(level) as Games.FrostDragon.Models.GameResults.Spins.SpinResult;
            var targetWheel    = MainGameEngine.GetTargetWheel(level, config, freeSpinResult.Wheel.ReelStripsId);

            FreeSpinCollapsingResult freeSpinCollapsingResult = null;

            do
            {
                freeSpinCollapsingResult = FreeSpinBonusEngine.CreateFreeSpinCollapsingResult(freeSpinResult, targetWheel, config.BonusConfig.FreeSpin.Multipliers, config.Payline, config.PayTable);

                if (freeSpinCollapsingResult.Win > 0)
                {
                    freeSpinResult = freeSpinCollapsingResult;
                }
            } while (freeSpinCollapsingResult.Win > 0);

            var targetMultiplier = CollapsingBonusEngine.GetCollapseMultiplier(config.BonusConfig.FreeSpin.Multipliers, freeSpinCollapsingResult.CollapsingSpinCount - 1);

            Assert.IsTrue(freeSpinResult.AvalancheMultiplier == targetMultiplier);
        }
        public void EngineShouldCreateCollapsingSpinResultWithCorrectMultiplier(int level)
        {
            var config      = new Configuration();
            var spinResult  = GenerateWinningSpinResult(level);
            var targetWheel = MainGameEngine.GetTargetWheel(level, config, spinResult.Wheel.ReelStripsId);

            CollapsingSpinResult collapsingSpinResult = null;

            do
            {
                collapsingSpinResult = CollapsingBonusEngine.CreateCollapsingSpinResult(spinResult, targetWheel, config.BonusConfig.Collapse.Multipliers, config.Payline, config.PayTable);

                if (collapsingSpinResult.Win > 0)
                {
                    spinResult = collapsingSpinResult;
                }
            } while (collapsingSpinResult.Win > 0);

            var targetMultiplier = CollapsingBonusEngine.GetCollapseMultiplier(config.BonusConfig.Collapse.Multipliers, collapsingSpinResult.CollapsingSpinCount - 1);

            Assert.IsTrue(spinResult.AvalancheMultiplier == targetMultiplier);
        }