Example #1
0
        public CubeState()
        {
            left  = new LeftFace(this);
            front = new FrontFace(this);
            right = new RightFace(this);
            back  = new BackFace(this);
            up    = new TopFace(this);
            down  = new BottomFace(this);

            left.setNeightbors();
            front.setNeightbors();
            right.setNeightbors();
            back.setNeightbors();
            up.setNeightbors();
            down.setNeightbors();

            PrintColors = true;
        }
Example #2
0
        public void Move(string move)
        {
            //face that is facing us
            CubeFace     face = getFace(move);
            RotationType type = getRotationType(move);

            if (type == RotationType.clockwise)
            {
                face.rotateClockwise();
            }
            else if (type == RotationType.c_clockwise)
            {
                face.rotateCounterClockwise();
            }
            else if (type == RotationType.one_eighty)
            {
                face.rotateClockwise();
                face.rotateClockwise();
            }
        }