public void Progress() { switch (m_Tournament.Type) { #region RoundRobin Progression case TournamentType.RoundRobin: { break; } #endregion #region Single Elimination Progression case TournamentType.SingleElimination: { if (m_Matches.Count != 0) { if (m_CurrentMatch < m_Matches.Count) { Console.WriteLine("Getting a Match"); if (HaveUnoccupiedArena()) { MatchTimer bout = new MatchTimer(this, m_NextArena, m_Matches[m_CurrentMatch]); m_CurrentMatch += 1; } } else if (AllArenasUnoccupied() && m_CurrentMatch >= m_Matches.Count && m_CurrentRound < (m_Bracket.TotalRounds - 1)) { m_CurrentRound += 1; m_CurrentMatch = 0; m_Matches = m_Bracket.SEGetRound(m_CurrentRound); RoundDelayTimer delay = new RoundDelayTimer(this, m_DelayStart); delay.Start(); } else if (m_CurrentRound >= (m_Bracket.TotalRounds - 1)) { m_Bracket.SEGetWinners(m_Tournament); } } break; } #endregion #region Double Elimnination Progression case TournamentType.DoubleElimination: { break; } #endregion case TournamentType.Hybrid: { // TODO: Hybrid Logic break; } } }
public void Progress() { switch (m_Tournament.Type) { #region RoundRobin Progression case TournamentType.RoundRobin: { break; } #endregion #region Single Elimination Progression case TournamentType.SingleElimination: { if (m_Matches.Count != 0) { if (m_CurrentMatch < m_Matches.Count) { Console.WriteLine("Getting a Match"); if (HaveUnoccupiedArena()) { MatchTimer bout = new MatchTimer(this, m_NextArena, m_Matches[m_CurrentMatch]); m_CurrentMatch += 1; } } else if (AllArenasUnoccupied() && m_CurrentMatch >= m_Matches.Count && m_CurrentRound < (m_Bracket.TotalRounds-1)) { m_CurrentRound += 1; m_CurrentMatch = 0; m_Matches = m_Bracket.SEGetRound(m_CurrentRound); RoundDelayTimer delay = new RoundDelayTimer(this, m_DelayStart); delay.Start(); } else if (m_CurrentRound >= (m_Bracket.TotalRounds - 1)) { m_Bracket.SEGetWinners(m_Tournament); } } break; } #endregion #region Double Elimnination Progression case TournamentType.DoubleElimination: { break; } #endregion case TournamentType.Hybrid: { // TODO: Hybrid Logic break; } } }