예제 #1
0
파일: Deck.cs 프로젝트: sammmy-b/QuickSnap
        public void TestDeckCreation()
        {
            Deck d = new Deck();

            Assert.AreEqual(52, d.CardsRemaining);
        }
예제 #2
0
파일: Deck.cs 프로젝트: sammmy-b/QuickSnap
        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);
            }
        }
예제 #3
0
 /// <summary>
 /// Create a new game of Snap!
 /// </summary>
 public Snap()
 {
     _deck = new Deck ();
     _gameTimer = SwinGame.CreateTimer();
 }
예제 #4
0
파일: Snap.cs 프로젝트: 4906918/QuickSnap
 /// <summary>
 /// Create a new game of Snap!
 /// </summary>
 public Snap()
 {
     _deck = new Deck ();
 }
예제 #5
0
 /// <summary>
 /// Create a new game of Snap!
 /// </summary>
 public Snap()
 {
     _deck = new Deck ();
     _gameTimer = SwinGame.CreateTimer (); //creates gametimer object
 }
예제 #6
0
        public void TestDeckCreation()
        {
            Deck d = new Deck();

            Assert.AreEqual(52, d.CardsRemaining);
        }
예제 #7
0
파일: Snap.cs 프로젝트: MeetC617/QuickSnap
 /// <summary>
 /// Create a new game of Snap!
 /// </summary>
 public Snap()
 {
     _deck      = new Deck();
     _gameTimer = SwinGame.CreateTimer();
 }