/// <summary> /// Starts a new tournament. /// </summary> public void StartTournament() { if (CurrentTournament == null) { var fishers = Fishers.Read(x => x.IsFishing).ToList(); foreach (var fisher in fishers) { fisher.IsFishing = false; fisher.Hooked = null; fisher.HookedTime = null; Fishers.Update(fisher); } Fishers.Commit(); CurrentTournament = new TournamentResult { Date = DateTime.Now.AddMinutes(Settings.FishingTournamentDuration) }; NextTournament = null; TournamentStarted?.Invoke(CurrentTournament.Date); } }
public void Apply(TournamentStarted evt) => Fixture = Fixture.Create(Teams, evt.Seed);