예제 #1
0
 public CubePosition(Orient x, Orient y, Orient z)
 {
     orientList = new List <Orient>();
     orientList.Add(new Orient());
     orientList.Add(new Orient());
     orientList.Add(new Orient());
     this.X = new Orient(x);
     this.Y = new Orient(y);
     this.Z = new Orient(z);
 }
예제 #2
0
        public void InitRubikCube()
        {
            for (int i = 0; i < 27; ++i)
            {
                int x = i / 9;
                int y = (i - x * 9) / 3;
                int z = i - x * 9 - y * 3;

                Orient dx = new Orient(Alis.X, (AlisDirection)(x - 1));
                Orient dy = new Orient(Alis.Y, (AlisDirection)(y - 1));
                Orient dz = new Orient(Alis.Z, (AlisDirection)(z - 1));

                CubePosition pos = new CubePosition(dx, dy, dz);

                listCube.Add(new MyCube(pos));
            }
        }
예제 #3
0
 public Orient(Orient o)
 {
     this.ali   = o.ali;
     this.direc = o.direc;
 }