public void TestDeckCreation() { Deck d = new Deck(); Assert.AreEqual(52, d.CardsRemaining); }
public void TestDraw() { Deck d = new Deck(); Assert.AreEqual(52, d.CardsRemaining); Card c = d.Draw(); Assert.AreEqual(51, d.CardsRemaining); Assert.AreEqual(Rank.ACE, c.Rank); Assert.AreEqual(Suit.CLUB, c.Suit); int count = 51; // Draw all cards from the deck while ( d.CardsRemaining > 0 ) { c = d.Draw(); count--; Assert.AreEqual(count, d.CardsRemaining); } }
/// <summary> /// Create a new game of Snap! /// </summary> public Snap() { _deck = new Deck (); _gameTimer = SwinGame.CreateTimer(); }
/// <summary> /// Create a new game of Snap! /// </summary> public Snap() { _deck = new Deck (); }
/// <summary> /// Create a new game of Snap! /// </summary> public Snap() { _deck = new Deck (); _gameTimer = SwinGame.CreateTimer (); //creates gametimer object }
/// <summary> /// Create a new game of Snap! /// </summary> public Snap() { _deck = new Deck(); _gameTimer = SwinGame.CreateTimer(); }