public void AddRestOfDeck(IDeckDict <D> currentList) { if (currentList.ObjectExist(_objectList.First().Deck)) { _objectList.RemoveFirstItem(); //try to remove the first item. hopefully does not cause another issue. } _objectList.AddRange(currentList); _previousNum = _objectList.Count; // so far should be fine }
private static A8RoundRummyCardInformation GetLastCard(this IDeckDict <A8RoundRummyCardInformation> originalList, IDeckDict <A8RoundRummyCardInformation> newList) { if (originalList.Count != 8 && newList.Count != 7) { throw new BasicBlankException("The original list must have 8 cards and the new list must have 7 cards"); } return(originalList.Single(ThisCard => { return newList.ObjectExist(ThisCard.Deck) == false; })); }
public bool ObjectExist(int deck) { return(_privateDict.ObjectExist(deck)); }