Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
        public void EngineShouldIncreaseWinPositionMultiplierOnFreeSpinSpinCollapse(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  = freeSpinResult.AvalancheMultiplier;
            var targetWinPosition = freeSpinResult.WinPositions.FirstOrDefault();
            var symbolMultiplier  = config.PayTable.GetOdds(targetWinPosition.Symbol, targetWinPosition.Count);

            Assert.IsTrue(symbolMultiplier * targetMultiplier == targetWinPosition.Multiplier);
        }