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 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); }