コード例 #1
0
		public void NextCardTest() {
			Console.WriteLine("\nTesting Deck : NextCard()...");
			Deck deck;
		
			Console.Write("\tBeginning of deck\t... ");
			deck = new Deck();
			Card card = deck.nextCard();
			Assert.IsFalse(card.equals(null));
			Console.WriteLine("OK");
		
			Console.Write("\tMiddle of deck\t\t... ");
			deck = new Deck();
			for (int i = 0; i < deck.size() / 2; i++) {
				card = deck.nextCard();
			}
			Assert.IsFalse(card.equals(null));
			Console.WriteLine("OK");
		
			Console.Write("\tBeyond end of deck\t... ");
			deck = new Deck();
			for (int i = 0; i < deck.size(); i++) {
				card = deck.nextCard();
			}
			card = deck.nextCard();
			Assert.AreEqual(null, card);
			Console.WriteLine("OK");
		}
コード例 #2
0
ファイル: Dealer.cs プロジェクト: diaaanek/blackjack-tamu-431
	public Dealer(int numberOfDecks): base()
	{
		//super();
		deckOfCards = new Deck(numberOfDecks);
	}
コード例 #3
0
ファイル: Dealer.cs プロジェクト: diaaanek/blackjack-tamu-431
	public Dealer():base()
	{
        //super();
		deckOfCards = new Deck();
	}