/// <summary> /// Initializes the separate thread logic. /// </summary> /// <param name="match">The <see cref="Match"/> to automatically step.</param> public MatchControls(Match match) { controllingMatch = match; IsRunning = false; Delay = 0; Thread = new Thread(PlayLoop); SleepHandle = new AutoResetEvent(false); }
/// <summary> /// Initializes various internal variables. /// </summary> /// <param name="match">The <see cref="Match"/> to base settings on.</param> public RoundIterator(Match match) { MonitoringMatch = match; TargetRounds = MonitoringMatch.Config.GetValue<int>("mbc_match_rounds"); CurrentRoundIdx = 0; RoundList = new List<Round>(); roundsReached = false; }
public FirstToRoundIterator(Match match) : base(match) { }
public PlayAllRoundIterator(Match match) : base(match) { }
/// <summary> /// Creates a <see cref="RoundIterator"/> for a specific <paramref name="match"/>. /// </summary> /// <param name="match">The <see cref="Match"/> that requires a new <see cref="RoundIterator"/>.</param> /// <returns>A <see cref="RoundIterator"/>.</returns> public static RoundIterator CreateRoundIteratorFor(Match match) { RoundIterator iterator = null; switch (match.Config.GetValue<Mode>("mbc_match_rounds_mode")) { case Mode.AllRounds: iterator = new PlayAllRoundIterator(match); break; case Mode.FirstTo: iterator = new FirstToRoundIterator(match); break; } return iterator; }