Beispiel #1
0
        public static CubieFace Follow(this CubieFace face, Arrow direction, params uint[] turns)
        {
            foreach (var turn in turns)
            {
                var neighbour = face.Neighbour(direction);
                var next      = face.ReOrient(direction);
                var turned    = neighbour.ReOrient(next, turn);

                face      = neighbour;
                direction = turned;
            }

            return(face);
        }
Beispiel #2
0
        public static CubieFace FollowDirections(CubieFace result, Arrow direction)
        {
            foreach (var _ in Enumerable.Repeat <object>(null, 12))
            {
                var next = result.Neighbour(direction);

                Console.WriteLine(string.Format("{0} : {1} -> {2} = {3} : {4}", result.Cubie, result.Face, direction, next.Cubie, next.Face));

                direction = result.ReOrient(direction);
                result    = next;
            }

            Console.ReadLine();

            return(result);
        }