Beispiel #1
0
 public Set(MatchSettings settings)
 {
     this.maxGamesPerSet = settings.MaxGames;
     this.settings       = settings;
     winner = Winner.None;
     games  = new List <Game>();
     games.Add(new Game(settings));
     games[currentGame].TogglePlayer1Serves += Set_TogglePlayer1Serves;
 }
Beispiel #2
0
        public Match(MatchSettings settings)
        {
            this.settings   = settings;
            maxSetsPerMatch = settings.MaxSets;
            sets            = new List <Set>();
            if (maxSetsPerMatch == 1 && settings.SuperTiebreak)
            {
                sets.Add(new SuperTiebreak(settings));
            }
            else
            {
                sets.Add(new Set(settings));
            }
            winner = Winner.None;

            sets[currentSet].TogglePlayer1Serves += Match_TogglePlayer1Serves;
        }
Beispiel #3
0
 public Tiebreak(MatchSettings settings)
     : base(settings)
 {
     servechangecounter = 1;
 }
Beispiel #4
0
 public Game(MatchSettings settings)
 {
     this.noAdvantage   = settings.NoAdvantage;
     this.advantageText = settings.AdvantageText;
     winner             = Winner.None;
 }
Beispiel #5
0
 public SuperTiebreak(MatchSettings settings)
     : base(settings)
 {
     this.minLength     = settings.SuperTiebreakLength;
     servechangecounter = 1;
 }