Beispiel #1
0
        public string ShowRound(string tournamentName, Round round, int roundNo)
        {
            string result  = "";
            int    matchNo = 1;

            result += ("-----------------------------------------");
            result += ("        Liga: " + tournamentName);
            result += ("          Runde " + roundNo);
            result += ("-----------------------------------------");
            foreach (Match m in round.GetAllMatches())
            {
                string first  = PadSpaceToName(m.FirstOpponent.Name, 10);
                string second = m.SecondOpponent.Name;
                Console.WriteLine($"    {matchNo}. {first}  -  {second}");
                matchNo++;
            }

            if (round.FreeRider != null)
            {
                Console.WriteLine("        FreeRider: " + round.FreeRider.Name);
            }
            Console.WriteLine("-----------------------------------------");

            Console.Write("Tryk på en vilkårlig tast...");

            return(result);
        }
Beispiel #2
0
        public string SecondOpponent(int RoundNumber, int MatchNumber)
        {
            Tournament   t = GetTournament("X");
            Round        r = t.GetRound(RoundNumber);
            List <Match> m = r.GetAllMatches();

            return(m[MatchNumber].SecondOpponent.Name);
        }
Beispiel #3
0
        public void ShowRound(string tournamentName, Round round, int roundNo)
        {
            int matchNo = 1;

            foreach (Match m in round.GetAllMatches())
            {
                string first  = PadSpaceToName(m.FirstOpponent.Name, 10);
                string second = m.SecondOpponent.Name;

                matchNo++;
            }

            if (round.FreeRider != null)
            {
            }
        }