Пример #1
0
 private void SetFacePosition(VisualCube c, VisualCubeFace fToTurn, CubeFaceType desiredType)
 {
     if (fToTurn.FaceType != desiredType)
     {
         c.TurnCube(fToTurn, desiredType);
     }
 }
Пример #2
0
        /// <summary>
        /// Gets the start face to organize the corners
        /// </summary>
        /// <param name="c">Cube to search</param>
        /// <param name="blocks">Returns all the blocks with same side of the face</param>
        /// <returns>Returns the selected CubeFace.</returns>
        private VisualCubeFace GetStartFace(VisualCube c, out List<VisualCubeBlock> blocks)
        {
            VisualCubeFace selFace = new VisualCubeFace();
            blocks = new List<VisualCubeBlock>();
            foreach (VisualCubeFace item in c.GetFaces())
            {
                blocks = GetCornersFromSameSide(item);
                if (blocks.Count > 0)
                {
                    //TODO: Select best face to get the corner.
                    selFace = item;
                    break;
                }

            }
            return selFace;
        }
Пример #3
0
 /// <summary>
 /// Solves the first corners of the cube 
 /// </summary>
 /// <param name="cSolve">Cube to solve</param>
 private void SolveFirstCorners(VisualCube cSolve)
 {
     List<VisualCubeBlock> blocks;
     VisualCubeFace startFace = GetStartFace(cSolve, out blocks);
 }