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); }
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); }
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) { } }