예제 #1
0
        public static bool deckVerificationThing(CardId[] ids)
        {
            const int minDeckSize = 25;
            if (ids.Count() < minDeckSize) return false;

            int nrOfIds = Enum.GetNames(typeof (CardId)).Length;
            int[] ctrs = new int[nrOfIds];
            foreach (CardId id in ids)
            {
                ctrs[(int) id]++;
            }

            for (int i = 0; i < nrOfIds; i++)
            {
                if (ctrs[i] > maxOf(Card.rarityOf((CardId)i))) return false;
            }
            return true;
        }