public void TestYaku() { LoveLive_MahjongClass.InitializeMahjongClass(); // 设置一些要和的牌 List <MahjongCard> Hand_Cards; List <MahjongCardFuru> Furu_Cards; Hand_Cards = new List <MahjongCard>() { LoveLive_MahjongClass.CardInfo[(int)MahjongCardName.Rin - 1], LoveLive_MahjongClass.CardInfo[(int)MahjongCardName.Rin - 1], LoveLive_MahjongClass.CardInfo[(int)MahjongCardName.Maki - 1], LoveLive_MahjongClass.CardInfo[(int)MahjongCardName.Maki - 1], LoveLive_MahjongClass.CardInfo[(int)MahjongCardName.Nico - 1], LoveLive_MahjongClass.CardInfo[(int)MahjongCardName.Nico - 1], LoveLive_MahjongClass.CardInfo[(int)MahjongCardName.Nozomi - 1], LoveLive_MahjongClass.CardInfo[(int)MahjongCardName.Nozomi - 1], LoveLive_MahjongClass.CardInfo[(int)MahjongCardName.Hanayo - 1], LoveLive_MahjongClass.CardInfo[(int)MahjongCardName.Hanayo - 1], LoveLive_MahjongClass.CardInfo[(int)MahjongCardName.Eli - 1], LoveLive_MahjongClass.CardInfo[(int)MahjongCardName.Eli - 1], LoveLive_MahjongClass.CardInfo[(int)MahjongCardName.Kotori - 1], LoveLive_MahjongClass.CardInfo[(int)MahjongCardName.Kotori - 1], }; Furu_Cards = new List <MahjongCardFuru>() { }; MahjongLogic logic = new MahjongLogic(); bool Hu = logic.utIsHu(Hand_Cards, Furu_Cards, out List <HuCard> huCards); Assert.IsTrue(Hu); List <MahjongYaku> yakus = logic.utCalcYaku(huCards); foreach (MahjongYaku yaku in yakus) { Trace.WriteLine(yaku); } Trace.WriteLine($"点数:{logic.utCalcHuPoints(huCards)}"); }