public object Clone() { return(new StickRoundInfo { PlayActionList = PlayActionList ?.Select(p => (PlayAction)p?.Clone())?.ToList(), StickResult = (StickResult)StickResult?.Clone() }); }
private StickResult GetStickResult() { if (!StickSuit.HasValue || PlayActionList.Count != 4) { return(null); } var winner = PlayActionList .OrderByDescending(a => a.Card, GetCardComparer()) .First() .PlayerInfo; var cardList = PlayActionList .Select(a => a.Card) .ToList(); var stickResult = new StickResult { Winner = winner, StickPile = cardList }; return(stickResult); }