public Card( Suit suit, int rank, bool bFaceUp, Deck d ) { this.Suit = suit; this.FaceUp = bFaceUp; m_deck = d; this.Location = Point.Empty; this.Rank = rank; }
public void TestDeckConstructor( ) { Deck d = new Deck( ); Assert.AreEqual( d.Count, 52 ); }
/// <summary> /// Creates all the piles, puts all the cards in their /// correct places, and sets everything up nicely so /// we can start a new game. /// </summary> protected void SetUpBoard( ) { m_deck = new Deck( ); m_piles = new PileCollection( ); m_suitPiles = new PileCollection( ); m_flatPiles = new PileCollection( ); // Comment out if we want a consistent deck! m_deck.Shuffle( ); CreateSuitPiles( ); CreateFlatPiles( ); CreateDeckPile( ); CreateDealtPile( ); }