Ejemplo n.º 1
0
 private String Replace(ScrambleElements se)
 {
     if (se.ToString() == "R1")
     {
         return("R'");
     }
     if (se.ToString() == "L1")
     {
         return("L'");
     }
     if (se.ToString() == "D1")
     {
         return("D'");
     }
     if (se.ToString() == "U1")
     {
         return("U'");
     }
     if (se.ToString() == "B1")
     {
         return("B'");
     }
     if (se.ToString() == "F1")
     {
         return("F'");
     }
     return(se.ToString());
 }
Ejemplo n.º 2
0
        public ScrambleElements GetRandomSE()
        {
            List <Int32>     choosearray = new List <Int32>();
            ScrambleElements se;

            if (!IsFirstTime)
            {
                if (previous.ToString().Contains("R"))
                {
                    choosearray = new List <Int32>()
                    {
                        1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17
                    };
                }
                if (previous.ToString().Contains("L"))
                {
                    choosearray = new List <Int32>()
                    {
                        0, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 14, 15, 16, 17
                    };
                }
                if (previous.ToString().Contains("F"))
                {
                    choosearray = new List <Int32>()
                    {
                        0, 1, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 15, 16, 17
                    };
                }
                if (previous.ToString().Contains("D"))
                {
                    choosearray = new List <Int32>()
                    {
                        0, 1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 16, 17
                    };
                }
                if (previous.ToString().Contains("B"))
                {
                    choosearray = new List <Int32>()
                    {
                        0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16
                    };
                }
                if (previous.ToString().Contains("U"))
                {
                    choosearray = new List <Int32>()
                    {
                        0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 17
                    };
                }
                random.Next(0, 15);
                Int32 index = random.Next(0, 15);
                se       = (ScrambleElements)choosearray[index];
                previous = se;
                return(se);
            }
            IsFirstTime = false;
            se          = (ScrambleElements)random.Next(0, 17);
            return(se);
        }