Beispiel #1
0
        /// <summary>
        /// Compares to other card class.
        /// </summary>
        /// <param name="other">The card to compare to.</param>
        /// <returns>The result of the comparison.</returns>
        public int CompareTo(Card other)
        {
            const int SAME   = 0;
            const int NULLED = -1;

            if (null == other)
            {
                return(NULLED);
            }

            int comparison = SuitString.CompareTo(other.SuitString);

            if (SAME != comparison)
            {
                return(comparison);
            }

            return(SymbolString.CompareTo(other.SymbolString));
        }
Beispiel #2
0
 public void SetSuit(Suit suit)
 {
     nowSuit = suit;
     Debug.Log(SuitString.ToString(nowSuit));
 }