private int FindBestCard(DeckRegularDict <RegularSimpleCard> list) { var bestsuit = list.GroupBy(x => x.Suit).OrderByDescending(Temps => Temps.Count()); var suituse = bestsuit.First().Key; list.KeepConditionalItems(Items => Items.Suit == suituse); return(list.GetRandomItem().Deck); }
public EnumSuitList SuitToChoose(CrazyEightsPlayerItem player) { var best = player.MainHandList.GroupBy(x => x.Suit).OrderByDescending(Temps => Temps.Count()); return(best.First().Key); }