/// <summary>
        /// Iterates through the linked list nodes starting with this node and in a circular fashion.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="Node"></param>
        /// <returns></returns>
        public static IEnumerable <LinkedListNode <T> > AsCircularEnumerable <T>(this LinkedListNode <T> Node)
        {
            LinkedListNode <T> currentNode = Node;

            do
            {
                yield return(currentNode);

                currentNode = currentNode.CircularNext();
            } while (currentNode != Node);
        }
        /// <summary>
        /// Removes the given number of nodes after this node and returns them. If the end of the list is reached, it will wrap around to the first element in the list.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="node"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        public static IEnumerable <LinkedListNode <T> > CircularRemoveAfter <T>(this LinkedListNode <T> node, int count)
        {
            LinkedList <T> list = node.List;

            while (count-- > 0)
            {
                LinkedListNode <T> next = node.CircularNext();
                list.Remove(next);
                yield return(next);
            }
        }
        static void GetCrabby(ref Cups cups, int numCups, int numMoves)
        {
            int minCup = cups.Min();
            int maxCup = cups.Max();

            if (numCups > cups.Count)
            {
                int cupsToAdd = numCups - cups.Count;
                cups    = new Cups(cups, Enumerable.Range(maxCup + 1, cupsToAdd));
                maxCup += cupsToAdd;
            }


            LinkedListNode <int> currentCup = cups.First;

            for (int i = 0; i < numMoves; i++)
            {
                //Pick up the next 3 cups for later use
                List <LinkedListNode <int> > pickedUp = currentCup.CircularRemoveAfter(3).ToList();              //cups.Skip(1).Take(3).ToList();

                //Calcluate our destination cup
                int destination = currentCup.Value;
                do
                {
                    destination--;
                    if (destination < minCup)
                    {
                        destination = maxCup;
                    }
                } while (pickedUp.Select(x => x.Value).Contains(destination));

                //Find the destination cup
                LinkedListNode <int> destinationCup = cups[destination];

                //Insert the picked up cups after the destination cup
                destinationCup.AddAfter(pickedUp);

                //Move the crab to the next cup for the next move.
                currentCup = currentCup.CircularNext();                 //cups.Next();
            }
        }