public void start() { Dealer = new Player("Dealer"); Player1 = new Player("Player One"); Deck = new PlayingCardDeck(); }
private bool isSameDeck(Deck d1, Deck d2) { int size = d1.Count; int sameCardCount = 0; for(int i=0; i<size;i++) { Card card1 = d1.dealCard(); Card card2 = d2.dealCard(); if (card1.Equals(card2)) sameCardCount++; } if (sameCardCount == size) return true; return false; }
public Player(String name="default name") { Name = name; Hand = new Deck(); }
private bool isDeckShuffled(Deck deck) { Deck unshuffled = new PlayingCardDeck(); return !isSameDeck(deck, unshuffled); }
public void dealingFromEmptyDeckThrowsException() { Deck emptyDeck = new Deck(); emptyDeck.dealCard(); }
public void createPlayingCardDeck() { deck = new PlayingCardDeck(); }