Example #1
0
 public static void PrintPlaySetIndices(PlaySet[] playSets)
 {
     for (int i = 0; i < playSets.Length; i++)
     {
         System.Console.Write(i.ToString("D2") + "   ");
     }
 }
Example #2
0
        private bool CanMove(int set1, int set2)
        {
            Card    card    = this.playSets[set1].GetBottomCard();
            PlaySet destSet = this.playSets[set2];

            return(card != null ? CanMoveCardTo(destSet, card) : false);
        }
Example #3
0
        public static void PrintPlaySets(PlaySet[] playSets)
        {
            int mostVisibleCards = 0;

            foreach (PlaySet set in playSets)
            {
                System.Console.Write("Hi" + set.GetNumberOfHiddenCards() + "  ");

                if (set.GetNumberOfVisibleCards() > mostVisibleCards)
                {
                    mostVisibleCards = set.GetNumberOfVisibleCards();
                }
            }
        }
Example #4
0
        private bool CanMoveCardTo(PlaySet destSet, Card card)
        {
            Card destCard = destSet.GetTopCard();

            if (destCard == null)
            {
                return(card.Value == 13);
            }

            if (AreAlternateSuits(destCard, card))
            {
                return(destCard.Value == (card.Value + 1));
            }

            return(false);
        }
        private bool CanMoveCardTo(PlaySet destSet, Card card)
        {
            Card destCard = destSet.GetTopCard();

            if (destCard == null)
            {
                return card.Value == 13;
            }

            if (AreAlternateSuits(destCard, card))
            {
                return destCard.Value == (card.Value + 1);
            }

            return false;
        }