public static bool DistributeNewCars(ExtendendList <Structure> tmpLst, Game currentGame) { if (Structure.CanDistributeCards(tmpLst)) { if (currentGame.OtherCards.Count != 0 && currentGame.OtherCards.Count > 9) { int count = 0; ExtendendList <Cart> saved = new ExtendendList <Cart>(); foreach (Structure str in tmpLst) { Cart toAdd = currentGame.OtherCards[count]; saved.Add(toAdd); toAdd.Active = true; str.lstCards.Add(toAdd); count++; } for (int i = 0; i <= count - 1; i++) { currentGame.OtherCards.Remove(saved[i]); } Structure.SetState(tmpLst, false); } return(true); } else { return(false); } }