Exemplo n.º 1
0
 public void Initialize(RandomType randomType)
 {
     // swap LR
     if (randomType.HasFlag(RandomType.LR))
     {
         if (r.Next(0, 2) % 2 == 0)
         {
             Swap(keyChange, 8, 9);
         }
     }
     // swap in symbol
     if (randomType.HasFlag(RandomType.Symbol))
     {
         RandomSwap(0, 4);
     }
     // swap in direction
     if (randomType.HasFlag(RandomType.Direction))
     {
         RandomSwap(4, 8);
     }
     // exchange symbol and direction
     if (randomType.HasFlag(RandomType.Symbol) && randomType.HasFlag(RandomType.Direction))
     {
         if (r.Next(0, 2) % 2 == 0)
         {
             for (int i = 0; i < 4; i++)
             {
                 Swap(keyChange, i, i + 4);
             }
         }
     }
 }