public bool MoveNext()
        {
            // Move the suits on as well as the values are exhausted this turn.
            if (!m_values.MoveNext())
            {
                // No more suits - So no more data to return.
                if (!m_suits.MoveNext())
                {
                    return(false);
                }

                // Reset the values after moving to the next suit.
                m_values.Reset();
                m_values.MoveNext();
            }

            return(true); // There are still values in the enumerator.
        }
Exemple #2
0
        private static void displayValues()
        {
            Console.WriteLine("The Values are:");
            IEnumerator values = new CardValuesEnumerator();

            while (values.MoveNext())
            {
                Console.WriteLine(values.Current);
            }
        }