public void PutCardOnBottom_OrderedLibrary_CardOnBottom()
 {
     SelectableLinkedList<GameCard> cards = new SelectableLinkedList<GameCard>();
     for (int i = 0; i < 29; i++)
         cards.AddFirst(new MockCard());
     GameLibrary lib = new GameLibrary();
     lib.Add(cards);
     lib.AddBottom(new MockCardWithData(42));
     lib.TakeCards(29);
     Assert.IsTrue(((MockCardWithData)lib.TakeCards(1)[0]).data == 42);
 }
 public void PutCardAtPosition_NonemptyLibrary_CardAtPosition()
 {
     SelectableLinkedList<GameCard> cards = new SelectableLinkedList<GameCard>();
     for (int i = 0; i < 29; i++)
         cards.AddFirst(new MockCard());
     GameLibrary lib = new GameLibrary();
     lib.Add(cards);
     lib.AddAt(new MockCardWithData(42), 10);
     lib.TakeCards(9);
     Assert.IsTrue(((MockCardWithData)lib.TakeCards(1)[0]).data == 42);
 }
 public void ShuffleLibrary_OrderedLibrary_LibraryOrderReversed()
 {
     SelectableLinkedList<GameCard> cards = new SelectableLinkedList<GameCard>();
     for (int i = 0; i < 10; i++)
         cards.AddLast(new MockCardWithData(i + 1));
     GameLibrary lib = new GameLibrary();
     lib.Add(cards);
     lib.Shuffle(_ => 0);
     List<GameCard> newLib = lib.TakeCards(10);
     for (int i = 0; i < newLib.Count; i++)
     {
         Assert.IsTrue(((MockCardWithData)newLib[i]).data == 10 - i);
     }
 }