Пример #1
0
 public void Continue(char key)
 {
     if (!Match.IsOver(this))
     {
         Serve(key);
     }
 }
Пример #2
0
        public static void Scoreboard(Match m)
        {
            List <Score> scores = m.Sets.Select(s => s.CurrentScore()).ToList();
            var          range  = Enumerable.Range(1, scores.Count);
            List <int>   p1     = scores.Select(score => score.a).ToList();
            List <int>   p2     = scores.Select(score => score.b).ToList();

            if (Match.IsOver(m))
            {
                Console.WriteLine(WinString(Match.CurrentScore(m)));
            }

            Console.WriteLine(range.Aggregate("Set        |", FormatAgg));
            Console.WriteLine("---------------------------");
            Console.WriteLine(p1.Aggregate("Player A   |", FormatAgg));
            Console.WriteLine("---------------------------");
            Console.WriteLine(p2.Aggregate("Player B   |", FormatAgg));
            Console.WriteLine("---------------------------");
        }