public static void PrintPlaySetIndices(PlaySet[] playSets) { for (int i = 0; i < playSets.Length; i++) { System.Console.Write(i.ToString("D2") + " "); } }
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); }
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(); } } }
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; }