Ejemplo n.º 1
0
		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;
		}
Ejemplo n.º 2
0
		public void TestDeckConstructor( )
		{
			Deck d = new Deck( );

			Assert.AreEqual( d.Count, 52 );
		}
Ejemplo n.º 3
0
		/// <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( );
		}