Beispiel #1
0
        //return two Cubes that are similar
        public bool Similar(Cube other)
        {
            Cube normalizeMe = Clone();

            normalizeMe.Normalize();
            Cube normalizeOther = other.Clone();

            normalizeOther.Normalize();
            return(normalizeMe.CompareTo(normalizeOther) == 0);
        }
Beispiel #2
0
        /** The moves are learned from
         * http://peter.stillhq.com/jasmine/rubikscubesolution.html
         *
         * */

        public Cube ActOn(Cube side)
        {
            Cube returned = side.Clone();

            Action(returned);

            returned.Step++;
            returned.Path += Name;

            return(returned);
        }
Beispiel #3
0
        private Cube _cube;                     // The cube the program is trying to resolve.

        /// <summary>
        /// Creates a new instance of the <see cref="FCubeSolver"/> class.
        /// </summary>
        /// <param name="cube">The cube.</param>
        public CubeSolver(Cube cube)
        {
            _cube             = cube.Clone();
            _currentView      = new CubeView(_cube.GetFaceColor(Face.Front), _cube.GetFaceColor(Face.Up));
            _currentAlgorithm = new List <Move>();
        }