public void SetUp() { _john = new FiftyTwoCardGamePlayer() { Name = "John" }; _jane = new FiftyTwoCardGamePlayer() { Name = "Jane" }; _johnDuplicate = new FiftyTwoCardGamePlayer() { Name = "John", }; }
public void SetUp() { _moveControllerMock = new Mock <IMoveController <FiftyTwoCardGamePlayer, FiftyTwoCardGameDeck, FiftyTwoCardGameCard> >(); _cardTray = new Mock <ICardTray <FiftyTwoCardGamePlayer, FiftyTwoCardGameDeck, FiftyTwoCardGameCard> >(); _cards = new List <FiftyTwoCardGameCard>() { new FiftyTwoCardGameCard(Suite.Clubs, Face.Ace), new FiftyTwoCardGameCard(Suite.Hearts, Face.Ten), new FiftyTwoCardGameCard(Suite.Hearts, Face.Ace), }; _sampleDeck = new FiftyTwoCardGameDeck(); _sampleDeck.Put(_cards); _jane = new FiftyTwoCardGamePlayer() { Name = "Jane", Status = PlayerStatus.Competing, Deck = _sampleDeck }; }
private static IEnumerable <FiftyTwoCardGamePlayer> CreatePlayersAndAssignDecks( IDictionary <string, IEnumerable <FiftyTwoCardGameCard> > playerCards) { foreach (var playerCard in playerCards) { var player = new FiftyTwoCardGamePlayer { Name = playerCard.Key, Deck = new FiftyTwoCardGameDeck(), Status = PlayerStatus.Competing }; foreach (var card in playerCard.Value) { player.Deck.Put(card); } yield return(player); } }