Esempio n. 1
0
        private static SummaryData ExecuteMainGameCollapsing(int level, RequestContext <BonusArgs> bonusRequestcontext, WolvesResult result)
        {
            var bonus         = module.CreateBonus(result);
            var summData      = new SummaryData();
            var freeSpinBonus = bonus.Value as WolvesBonus;

            do
            {
                var freeSpinResult = BonusReducer.dispatch(level, freeSpinBonus, bonusRequestcontext) as WolvesSeqFreeSpinResult;
                summData.MgRollingWin += freeSpinResult.Win;
                if (freeSpinResult.SpinResult.HasBonus)
                {
                    if (freeSpinResult.SpinResult.Bonus.ClientId == 4)
                    {
                        summData.MgFHit++;
                        summData += ExecuteFreeSpin(level, bonusRequestcontext, freeSpinResult.SpinResult);
                        break;
                    }
                }

                if (freeSpinResult.IsCompleted)
                {
                    break;
                }
                freeSpinBonus = freeSpinResult.Bonus as WolvesBonus;
            } while (true);
            return(summData);
        }
Esempio n. 2
0
        private static SummaryData ExecuteFreeSpin(int level, RequestContext <BonusArgs> bonusRequestcontext, WolvesResult result)
        {
            var bonus         = module.CreateBonus(result);
            var summData      = new SummaryData();
            var freeSpinBonus = bonus.Value as WolvesBonus;
            var totalFreeSpin = 0;
            var fscouter      = 0;

            switch (result.Wheel.Reels.Sum(ele => ele.Count(item => item == 9)))
            {
            case 3:
                totalFreeSpin = 10;
                break;

            case 4:
                totalFreeSpin = 15;
                break;

            case 5:
                totalFreeSpin = 20;
                break;
            }
            do
            {
                var freeSpinResult = BonusReducer.dispatch(level, freeSpinBonus, bonusRequestcontext) as WolvesSeqFreeSpinResult;
                var spinResult     = freeSpinResult.SpinResult;
                if (spinResult.Wheel.Type == 4)
                {
                    summData.FgRollingWin += spinResult.Win;
                }
                else
                {
                    summData.FSpinCounter++;
                    fscouter++;
                    summData.FSTotalWin += spinResult.Win;
                }

                if (spinResult.HasBonus)
                {
                    summData.FgRollingHit++;
                    Assert.True(spinResult.Win > 0);
                }

                if (freeSpinResult.IsCompleted)
                {
                    break;
                }
                freeSpinBonus = freeSpinResult.Bonus as WolvesBonus;
            } while (true);

            Assert.AreEqual(totalFreeSpin, fscouter);
            return(summData);
        }
Esempio n. 3
0
        private static SummaryData ExecuteMainGameHoney(int level, RequestContext <BonusArgs> bonusRequestcontext, BearResult result)
        {
            var bonus         = module.CreateBonus(result);
            var summData      = new SummaryData();
            var freeSpinBonus = bonus.Value as BearBonus;

            do
            {
                var freeSpinResult = BonusReducer.dispatch(level, freeSpinBonus, bonusRequestcontext);
                summData.MgHoneyWin += freeSpinResult.Win;
                if (freeSpinResult.IsCompleted)
                {
                    break;
                }
                freeSpinBonus = freeSpinResult.Bonus as BearBonus;
            } while (true);
            return(summData);
        }
Esempio n. 4
0
        private static SummaryData ExecuteFreeSpin(int level, RequestContext <BonusArgs> bonusRequestcontext, BearResult result)
        {
            var bonus         = module.CreateBonus(result);
            var summData      = new SummaryData();
            var freeSpinBonus = bonus.Value as BearBonus;

            do
            {
                summData.FSpinCounter++;
                var freeSpinResult = BonusReducer.dispatch(level, freeSpinBonus, bonusRequestcontext);
                var spinResult     = freeSpinResult.SpinResult;
                if (spinResult.HasBonus)
                {
                    var additionBonus = spinResult.Bonus;
                    if (additionBonus.ClientId == 4)
                    {
                        summData.FgHoneyHit++;
                    }
                    else if (additionBonus.ClientId == 3)
                    {
                        summData.FgFHit++;
                    }
                }

                if (spinResult.Type == "b")
                {
                    summData.FgHoneyWin += spinResult.Win;
                }
                else
                {
                    summData.FSTotalWin += spinResult.Win;
                }

                if (freeSpinResult.IsCompleted)
                {
                    break;
                }
                freeSpinBonus = freeSpinResult.Bonus as BearBonus;
            } while (true);

            return(summData);
        }