Пример #1
0
        private PassportCards GetNextEnumValue(PassportCards current)
        {
            PassportCards[] Arr = (PassportCards[])Enum.GetValues(current.GetType());
            int             j   = Array.IndexOf(Arr, current) + 1;

            return(Arr[j]);
        }
Пример #2
0
 // returns true if all attacking cards are passport
 public bool AllPassport(PassportCards passport)
 {
     foreach (Card card in attackingCards)
     {
         if ((int)card.rank != (int)passport)
         {
             return(false);
         }
     }
     return(true);
 }