コード例 #1
0
ファイル: Dice.cs プロジェクト: nickjones33/FarkleSim
        public void PrintPlays()
        {
            StringBuilder rtn = new();

            rtn.Append("Plays: ");

            Scorer scorer = new Scorer(DieArray);
            var    plays  = scorer.GetPlays().OrderByDescending(p => p.Value);

            if (plays.Any())
            {
                foreach (var scoreCombination in plays)
                {
                    rtn.Append($"({scoreCombination.Label}: {scoreCombination.Value}), ");
                }
                Console.WriteLine(rtn.ToString());
            }
        }