Exemple #1
0
        public void TestBonusBuilder()
        {
            // arrange
            var user   = new UserGameKey(-1, 30);
            var wheel1 = new List <int[]>
            {
                new [] { 9, 9, 9 },
                new [] { 0, 10, 1 },
                new [] { 0, 10, 3 },
                new [] { 0, 10, 2 },
                new [] { 2, 3, 4 }
            };
            var wheel2 = new List <int[]>
            {
                new [] { 0, 2, 1 },
                new [] { 0, 8, 1 },
                new [] { 0, 8, 3 },
                new [] { 7, 8, 2 },
                new [] { 2, 3, 4 }
            };

            var wheel3 = new List <int[]>
            {
                new [] { 0, 2, 1 },
                new [] { 0, 9, 1 },
                new [] { 0, 9, 3 },
                new [] { 7, 9, 2 },
                new [] { 2, 3, 4 }
            };

            // action
            var result1  = BonusInspection.InspectFreeSpin(wheel1);
            var result11 = BonusInspection.InspectSwimWear(wheel1);
            var result12 = BonusInspection.InspectBodyPart(wheel1);

            var result2  = BonusInspection.InspectFreeSpin(wheel2);
            var result21 = BonusInspection.InspectSwimWear(wheel2);
            var result22 = BonusInspection.InspectBodyPart(wheel2);

            var result3  = BonusInspection.InspectFreeSpin(wheel3);
            var result31 = BonusInspection.InspectSwimWear(wheel3);
            var result32 = BonusInspection.InspectBodyPart(wheel3);

            // Assert

            Assert.IsTrue(result1.HasValue);
            Assert.IsTrue(result1.ValueOrDefault().Item.Count == 4);
            Assert.IsTrue(result11.None);
            Assert.IsTrue(result12.None);

            Assert.IsTrue(result2.None);
            Assert.IsTrue(result21.HasValue);
            Assert.IsTrue(result21.ValueOrDefault().Item.Count == 1);
            Assert.IsTrue(result22.None);

            Assert.IsTrue(result3.None);
            Assert.IsTrue(result31.None);
            Assert.IsTrue(result32.HasValue);
            Assert.IsTrue(result32.ValueOrDefault().Item.Count == 3);
        }
Exemple #2
0
        public void TestBonusBuilder()
        {
            // arrange
            var user   = new UserGameKey(-1, 51);
            var wheel1 = new List <int[]>
            {
                new [] { 9, 9, 9 },
                new [] { 0, 10, 1 },
                new [] { 0, 10, 3 },
                new [] { 0, 10, 2 },
                new [] { 2, 3, 4 }
            };
            var wheel2 = new List <int[]>
            {
                new [] { 0, 2, 1 },
                new [] { 0, 10, 1 },
                new [] { 0, 10, 3 },
                new [] { 7, 8, 2 },
                new [] { 2, 3, 4 }
            };

            var wheel3 = new List <int[]>
            {
                new [] { 0, 2, 1 },
                new [] { 0, 9, 1 },
                new [] { 0, 9, 3 },
                new [] { 7, 9, 2 },
                new [] { 2, 3, 4 }
            };

            // action
            var result1 = BonusInspection.InspectFreeSpin(wheel1);
            var result2 = BonusInspection.InspectFreeSpin(wheel2);
            var result3 = BonusInspection.InspectSarchophagus(wheel3);

            // Assert

            Assert.IsTrue(result1.HasValue);
            Assert.IsTrue(result1.ValueOrDefault().Item.Count == 15);

            Assert.IsTrue(result2.None);

            Assert.IsTrue(result3.HasValue);
            Assert.IsTrue(result3.ValueOrDefault().Item.Count == 1);
        }
        public void TestBonusBuilder()
        {
            // arrange
            var user         = new UserGameKey(-1, 30);
            var stickyWilds1 = new[] { 0, 1, 0, 0, 0 };
            var stickyWilds2 = new[] { 0, 0, 0, 0, 0 };
            var stickyWilds3 = new[] { 0, 1, 2, 3, 0 };

            var wheel1 = new List <int[]> {
                new [] { 0, 2, 1 },
                new [] { 0, 0, 1 },
                new [] { 0, 7, 3 },
                new [] { 0, 1, 2 },
                new [] { 2, 3, 4 }
            };
            var wheel2 = new List <int[]> {
                new [] { 0, 2, 1 },
                new [] { 0, 0, 1 },
                new [] { 0, 7, 3 },
                new [] { 7, 1, 2 },
                new [] { 2, 3, 4 }
            };

            var wheel3 = new List <int[]> {
                new [] { 0, 2, 1 },
                new [] { 0, 7, 1 },
                new [] { 0, 7, 3 },
                new [] { 0, 1, 7 },
                new [] { 2, 3, 4 }
            };

            // action
            var respin1 = BonusInspection.InspectFreeSpin(stickyWilds1, wheel1);
            var respin2 = BonusInspection.InspectFreeSpin(stickyWilds1, wheel2);
            var respin3 = BonusInspection.InspectFreeSpin(stickyWilds2, wheel3);
            var respin4 = BonusInspection.InspectFreeSpin(stickyWilds3, wheel3);

            // assert
            Assert.IsTrue(respin1.HasValue);
            Assert.IsTrue(respin2.HasValue);
            Assert.IsTrue(respin3.HasValue);
            Assert.IsTrue(respin4.None);
        }
        public void TestBonusBuilder()
        {
            var user          = new UserGameKey(-1, 104);
            var result        = new Games.DragonRiches.DragonRichesResult();
            var reelsHoldSpin = new List <int[]>
            {
                new [] { 1, 6, 11 },
                new [] { 6, 11, 11 },
                new [] { 11, 10, 11 },
                new [] { 9, 11, 11, },
                new [] { 11, 11, 11 }
            };

            var reelsFreeSpin = new List <int[]>
            {
                new [] { 1, 6, 12 },
                new [] { 6, 12, 12 },
                new [] { 12, 9, 13 },
                new [] { 9, 12, 12, },
                new [] { 12, 12, 9 }
            };

            // action
            var holdSpinBonus = BonusInspection.InspectHoldSpin(reelsHoldSpin);
            var freeSpinBonus = BonusInspection.InspectFreeSpin(reelsFreeSpin);

            // assert
            Assert.NotNull(holdSpinBonus);
            Assert.NotNull(freeSpinBonus);
            Assert.IsTrue(holdSpinBonus.HasValue);
            Assert.IsTrue(freeSpinBonus.HasValue);
            Assert.AreEqual(holdSpinBonus.ValueOrDefault().At, new List <int[]> {
                new[] { 0, 0, 3 }, new[] { 0, 2, 3 }, new[] { 1, 0, 3 }, new[] { 0, 2, 3 }, new[] { 1, 2, 3 }
            });
            Assert.AreEqual(freeSpinBonus.ValueOrDefault().At, new List <int[]> {
                new[] { 0 }, new[] { 0 }, new[] { 2 }, new[] { 1 }, new[] { 3 }
            });
        }
Exemple #5
0
        public void TestBonusBuilder()
        {
            // arrange
            var user   = new UserGameKey(-1, 80);
            var wheel1 = new List <int[]>
            {
                new [] { 9, 9, 9 },
                new [] { 0, 3, 1, 0 },
                new [] { 0, 6, 3, 0 },
                new [] { 0, 3, 2, 0 },
                new [] { 2, 3, 4 }
            };
            var wheel2 = new List <int[]>
            {
                new [] { 0, 2, 1 },
                new [] { 0, 10, 1, 0 },
                new [] { 0, 10, 3, 0 },
                new [] { 7, 10, 2, 0 },
                new [] { 2, 3, 4 }
            };

            // action
            var result1 = BonusInspection.InspectFreeSpin(wheel1);
            var result2 = BonusInspection.InspectReSpin(new[] { 0 }, wheel1);
            var result3 = BonusInspection.InspectFreeSpin(wheel2);
            var result4 = BonusInspection.InspectReSpin(new[] { 0 }, wheel2);

            // Assert

            Assert.IsTrue(result1.None);
            Assert.IsTrue(result2.HasValue);
            Assert.IsTrue(result2.ValueOrDefault().Item.Count == 3);
            Assert.AreEqual(result2.ValueOrDefault().At, new[] { 1, 0, 0, 0, 0 });
            Assert.IsTrue(result3.HasValue);
            Assert.IsTrue(result3.ValueOrDefault().Item.Count == 10);
            Assert.AreEqual(result3.ValueOrDefault().At, new[] { 0, 2, 2, 2, 0 });
            Assert.IsTrue(result4.None);
        }