public void Evaluation_SlotResult4() { paytable.ScatterComboGroup.Combos.Clear(); paytable.ScatterComboGroup.AddPayCombo(new PayCombo(new Symbol(1, "BB"), 4, 1000)); ReelWindow reelWindow = new ReelWindow(paytable.BaseGameReelGroup, new List <int> { 0, 0, 0 }); SlotResult results = scatterEvaluator.Evaluate(paytable, reelWindow, rng); var component = results.GetComponent <ScattersComponent>(); Assert.IsNull(component); }
public void Evaluation_SlotResult1() { rng = new DummyRng(new List <int> { 7 }); SlotResult results = pickEvaluator.Evaluate(paytable, null, rng); var component = results.GetComponent <PickComponent>(); Assert.IsNotNull(component); Assert.AreEqual(1, component.PickResults.Count); Assert.AreEqual("Free Spins", component.PickResults[0].Trigger); }
public void Evaluation_SlotResult1() { paytable.ScatterComboGroup.Combos.Clear(); paytable.ScatterComboGroup.AddPayCombo(new PayCombo(new Symbol(0, "AA"), 3, 1000)); ReelWindow reelWindow = new ReelWindow(paytable.BaseGameReelGroup, new List <int> { 0, 0, 0 }); SlotResult results = scatterEvaluator.Evaluate(paytable, reelWindow, rng); var component = results.GetComponent <ScattersComponent>(); Assert.IsNotNull(component); Assert.AreEqual(1, component.PayResults.Count); Assert.AreEqual(1000, component.PayResults[0].PayCombo.PayAmount); }
public void Evaluation_Payline4() { // Reel Window // AA AA WW BB BB // BB BB AA CC CC // CC CC BB WW WW ReelWindow reelWindow = new ReelWindow(paytable.BaseGameReelGroup, new List <int> { 0, 0, 3, 1, 1 }); SlotResult results = paylineEvaluator.Evaluate(paytable, reelWindow, rng); var component = results.GetComponent <PaylinesComponent>(); Assert.IsNotNull(component); Assert.AreEqual(1, component.PayResults.Count); Assert.AreEqual(10, component.PayResults[0].PayCombo.PayAmount); // 3 x AA }
public void Evaluation_SlotResult3() { // Reel Window // CC CC CC // DD DD DD // EE EE EE ReelWindow reelWindow = new ReelWindow(paytable.BaseGameReelGroup, new List <int> { 2, 2, 2 }); SlotResult results = paylineEvaluator.Evaluate(paytable, reelWindow, rng); var component = results.GetComponent <PaylinesComponent>(); Assert.IsNotNull(component); Assert.AreEqual(1, component.PayResults.Count); Assert.AreEqual(20, component.PayResults[0].PayCombo.PayAmount); // 3 x CC }
public void Evaluation_SlotResult5() { // Reel Window // FF FF FF // GG GG GG // AA AA AA ReelWindow reelWindow = new ReelWindow(paytable.BaseGameReelGroup, new List <int> { 5, 5, 5 }); SlotResult results = paylineEvaluator.Evaluate(paytable, reelWindow, rng); var component = results.GetComponent <PaylinesComponent>(); Assert.IsNotNull(component); Assert.AreEqual(1, component.PayResults.Count); Assert.AreEqual(100, component.PayResults[0].PayCombo.PayAmount); // 3 x AA }
public void Evaluation_SlotResult8() { paytable.ScatterComboGroup.Combos.Clear(); paytable.ScatterComboGroup.AddPayCombo(new PayCombo(new Symbol(0, "AA"), 3, 100, "Free Spins")); ReelWindow reelWindow = new ReelWindow(paytable.BaseGameReelGroup, new List <int> { 0, 0, 0 }); SlotResult results = scatterEvaluator.Evaluate(paytable, reelWindow, rng); var component = results.GetComponent <ScattersComponent>(); Payline payline = component.PayResults[0].Payline; Assert.AreEqual(0, payline.PaylineCoords[0].ReelIndex); Assert.AreEqual(0, payline.PaylineCoords[0].Offset); Assert.AreEqual(1, payline.PaylineCoords[1].ReelIndex); Assert.AreEqual(0, payline.PaylineCoords[1].Offset); Assert.AreEqual(2, payline.PaylineCoords[2].ReelIndex); Assert.AreEqual(0, payline.PaylineCoords[2].Offset); }
public void Evaluation_SlotResult3() { rng = new DummyRng(new List <int> { 0, 0, 0, 0, 0, 0, 0, 0 }); SlotResult results = pickEvaluator.Evaluate(paytable, null, rng); var component = results.GetComponent <PickComponent>(); Assert.IsNotNull(component); Assert.AreEqual(8, component.PickResults.Count); Assert.AreEqual("Prize_10", component.PickResults[0].Name); Assert.AreEqual("Prize_10", component.PickResults[1].Name); Assert.AreEqual("Prize_10", component.PickResults[2].Name); Assert.AreEqual("Prize_10", component.PickResults[3].Name); Assert.AreEqual("Prize_20", component.PickResults[4].Name); Assert.AreEqual("Prize_20", component.PickResults[5].Name); Assert.AreEqual("Prize_30", component.PickResults[6].Name); Assert.AreEqual("PickComplete", component.PickResults[7].Name); }
/// <summary> /// The theme specific game evaluation logic. /// </summary> public SlotResults RunOneGame(int bet) { // Create the slot results. SlotResults slotResults = new SlotResults(); // Create the evaluators for the base game. PaylineEvaluator bgPaylineEval = new PaylineEvaluator(); ScatterEvaluator bgScatterEval = new ScatterEvaluator(); // Create the evaluators for the free games. PaylineEvaluator fgPaylineEval = new PaylineEvaluator(); ScatterEvaluator fgScatterEval = new ScatterEvaluator(); // Generate the random numbers. List <int> randomNumbers = new List <int>(); for (int reel = 0; reel < paytable.BaseGameReelGroup.Reels.Count; ++reel) { ReelStrip reelStrip = paytable.BaseGameReelGroup.Reels[reel].ReelStrip; randomNumbers.Add(rng.GetRandomNumber(reelStrip.Symbols.Count)); } ReelWindow reelWindow = new ReelWindow(paytable.BaseGameReelGroup, randomNumbers); // Evaluate the base game (payline and scatter evaluation). SlotResult paylineResults = bgPaylineEval.Evaluate(paytable, reelWindow, rng); SlotResult scatterResults = bgScatterEval.Evaluate(paytable, reelWindow, rng); slotResults.Results.Add(paylineResults); slotResults.Results.Add(scatterResults); slotResults.TotalWin += paylineResults.TotalWin; slotResults.TotalWin += scatterResults.TotalWin; // Evaluate the free games (if any). if (scatterResults.GetComponent <ScattersComponent>() != null) { // Add total number of free games. int freeGamesAwarded = 5; for (int i = 0; i < freeGamesAwarded; ++i) { // Generate the random numbers. randomNumbers = new List <int>(); for (int reel = 0; reel < paytable.FreeGamesReelGroup.Reels.Count; ++reel) { ReelStrip reelStrip = paytable.FreeGamesReelGroup.Reels[reel].ReelStrip; randomNumbers.Add(rng.GetRandomNumber(reelStrip.Symbols.Count)); } reelWindow = new ReelWindow(paytable.FreeGamesReelGroup, randomNumbers); // Evaluate the free game (payline and scatter evaluation). SlotResult fgPaylineResults = fgPaylineEval.Evaluate(paytable, reelWindow, rng); SlotResult fgScatterResults = fgScatterEval.Evaluate(paytable, reelWindow, rng); slotResults.Results.Add(fgPaylineResults); slotResults.Results.Add(fgScatterResults); slotResults.TotalWin += paylineResults.TotalWin; slotResults.TotalWin += scatterResults.TotalWin; } } return(slotResults); }