示例#1
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));
            }
        }
示例#2
0
 public MyCube(CubePosition pos)
 {
     origin = pos;
 }