namespace RuleEngine; public class Meld { public string Type { get; set; } = ""; // "kezi", "shunzi", "pair", "chi", "pung", "kong_ming", "kong_an", "kong_bu" public List Tiles { get; set; } = new(); // -1 = wildcard placeholder public bool IsConcealed { get; set; } public string SourcePlayer { get; set; } = ""; // who discarded the tile that triggered pung/chi/kong public Meld Clone() => new() { Type = Type, Tiles = new List(Tiles), IsConcealed = IsConcealed, SourcePlayer = SourcePlayer }; } public class MeldsResult { public bool IsWin { get; set; } public List Melds { get; set; } = new(); public List PairTiles { get; set; } = new(); // the pair (将牌) public List Fans { get; set; } = new(); public int WildcardsUsed { get; set; } public MeldsResult Clone() => new() { IsWin = IsWin, Melds = Melds.Select(m => m.Clone()).ToList(), PairTiles = new List(PairTiles), Fans = new List(Fans), WildcardsUsed = WildcardsUsed }; }