private void UpdatePossibleCombinations() { var sum = GetTeamSum(_gameFlow.CurrentTeam) + GetCurrentSerie().GetSum(); var limit = GetGameLimit(); var series = DartsEnding.GetPossibleEndings(limit - sum); lblPossibleCombinations.Text = string.Join("; ", series.Select(s => s.ToString(true))); }
static void Main(string[] args) { var desiredScore = 2; while (desiredScore <= 170) { var possibleSeries = DartsEnding.GetPossibleEndings(desiredScore); if (!possibleSeries.Any()) { Console.WriteLine("{0} - impossible", desiredScore); } { foreach (var serie in possibleSeries) { Console.WriteLine("{0} - {1}", desiredScore, serie.ToString(true)); } } desiredScore++; } Console.ReadLine(); }