예제 #1
0
                                     {0, 0, 10, 50, 125}, {0, 0, 10, 50, 125}, {0, 0, 10, 50, 125}, {0, 0, 10, 50, 125}, {0, 0, 10, 50, 125}}; // ACE KING QUEEN JACK TEN

        public SlotSpin(Random rng)
        {
            reelArray = new SlotReel[15];
            for (int i = 0; i < 15; i++)
            {
                double[] array;
                if (rng.NextDouble() <= 0.01) array = luckyArray;
                else array = probArray;
                double num = rng.NextDouble();
                int j;
                for (j = 0; j < 13; j++)
                {
                    if (num <= array[j])
                    {
                        break;
                    }
                }
                reelArray[i] = new SlotReel(j);
            }
        }
예제 #2
0
 public int CheckCombination(SlotReel[] combo, int num)
 {
     SlotReel.ReelType currentType = SlotReel.ReelType.WILD;
     SlotReel.ReelType newType;
     int i;
     for (i = 0; i < 5; i++)
     {
         newType = combo[i].GetReel();
         if (newType != currentType)
         {
             if (currentType == SlotReel.ReelType.WILD) currentType = newType;
             else if (newType == SlotReel.ReelType.WILD) { } //do nothing
             else break;
         }
     }
     return payouts[(int)currentType, i - 1];
 }