public void TestCreateDeck() { var journeyCards = new List<ICard> { new Card() { Age = 1}, new Card() {Age = 3, Name="Ragnarok"}, new Card() {Age = 2}, new Card() {Age = 1}, new Card() {Age = 1}, new Card() {Age = 1}, new Card() {Age = 1}, new Card() {Age = 1}, new Card() {Age = 1}, new Card() {Age = 1}, new Card() {Age = 1}, new Card() {Age = 1}, new Card() {Age = 1}, new Card() {Age = 1}, new Card() {Age = 1}, new Card() {Age = 2}, new Card() {Age = 2}, new Card() {Age = 2}, new Card() {Age = 2}, new Card() {Age = 2}, new Card() {Age = 2}, new Card() {Age = 2}, new Card() {Age = 2}, new Card() {Age = 2}, new Card() {Age = 2}, new Card() {Age = 3}, new Card() {Age = 3}, new Card() {Age = 3}, new Card() {Age = 3}, new Card() {Age = 3}, new Card() {Age = 3}, new Card() {Age = 3}, new Card() {Age = 3}, new Card() {Age = 3}, new Card() {Age = 3}, new Card() {Age = 3}, new Card() {Age = 3}, new Card() {Age = 3}, new Card() {Age = 3}, new Card() {Age = 3}, new Card() {Age = 3}, new Card() {Age = 3}, new Card() {Age = 3} }; var creator = new JourneyDeckCreator(journeyCards); var newList = creator.CreateDeck(4); Assert.AreEqual(newList.Where(card => card.Age == 1).Count(), 8, "Incorrect # of Age 1 Cards."); Assert.AreEqual(newList.Where(card => card.Age == 2).Count(), 8, "Incorrect # of Age 2 Cards."); Assert.AreEqual(newList.Where(card => card.Age == 3).Count(), 11, "Incorrect # of Age 3 Cards."); Assert.AreEqual(newList.Last().Name, "Ragnarok", "Ragnarok is not in the final position"); }
public IGame NewGame(int playerCount) { var journeyCards = new List<ICard>(); // THIS SHOULD PULL IN ALL JOURNEY CARDS FROM DATABASE var journeyDeckCreator = new JourneyDeckCreator(journeyCards); var journeyDeck = journeyDeckCreator.CreateDeck(playerCount); var captains = new List<ICaptain> { new ErikTheRed(), new BjornIronside(), new HaraldFairhair(), new IvarTheBoneless()}; return null;; }