private static PileOfCards GetPile(PileOfCards[] piles, Card cardType) { for (int i = 0; i < piles.Length; ++i) { PileOfCards cardPile = piles[i]; if (cardPile.IsType(cardType)) { return(cardPile); } } return(null); }
private PileOfCards GetPile(Card cardType) { for (int i = 0; i < this.supplyPiles.Length; ++i) { PileOfCards cardPile = this.supplyPiles[i]; if (cardPile.IsType(cardType)) { return(cardPile); } } return(null); }