public ShoeOfStandardDecksOfCards(ICardValueAssigner cardValueAssigner, int numberOfDecks) { for (int deckIndex = 0; deckIndex < numberOfDecks; deckIndex++) { Cards.AddRange(new StandardDeckOfCards(cardValueAssigner).Cards); } }
public Card(CardType type, CardSuit suit, ICardValueAssigner cardValueAssigner) { Suit = suit; Type = type; _cardValueAssigner = cardValueAssigner; Value = _cardValueAssigner.GetCardValueFor(Type, Suit); }
public StandardDeckOfCards(ICardValueAssigner cardValueAssigner) { for (int cardIndex = (int)CardType.Two; cardIndex <= (int)CardType.Ace; cardIndex++) { for (int suitIndex = (int)CardSuit.Diamonds; suitIndex <= (int)CardSuit.Spades; suitIndex++) { Cards.Add(new Card((CardType)cardIndex, (CardSuit)suitIndex, cardValueAssigner)); } } }
public BasicMinimumPlayerStrategyTest() { const int minimumBet = 10; const int maximumBet = 500; const int maximumPlayers = 4; _tableSettings = new TableSettings(minimumBet, maximumBet, maximumPlayers); _currentHand = new PlayerHand(); _blackjackCardValueAssigner = new BlackjackCardValueAssigner(); _nullCard = new NullCard(); _aceCard = new Card(CardType.Ace, CardSuit.Clubs, _blackjackCardValueAssigner); _sut = new BasicMinimumPlayerStrategy(); }
public void MyTestInitialize() { _cardValueAssigner = new Mock <ICardValueAssigner>().Object; }
public PlayerTest() { _blackjackCardValueAssigner = new BlackjackCardValueAssigner(); _nullCard = new NullCard(); _tableSettings = new TableSettings(10, 500, 4); }