示例#1
0
        public void Play(out Team Winner)
        {
            Start?.Invoke();
            Jingle?.Invoke("/Opening.mp3");
            RequestIn("Готовы к следующему раунду?");

            foreach (Round round in Rounds)
            {
                CurrentRound = round;
                RequestOut($"== {round.Name} ==");
                Jingle?.Invoke(round.Jingle);
                RefreshBoard?.Invoke();

                int score = round.Play(out Winner);
                Winner.Score += score;
                SetScore();

                RequestOut("-- Открываем табло --");
                round.Reveal();
                RequestIn("Готовы к следующему раунду?");
            }

            CurrentRound = FinalRound;
            RequestOut($"== {FinalRound.Name} ==");
            Jingle?.Invoke(FinalRound.Jingle);
            ShowTitle();
            FinalRound.Play(out Winner);

            Winner = Teams.OrderByDescending(team => team.Score)
                     .Take(1)
                     .Single();

            Jingle?.Invoke("/Closing.mp3");
            RequestIn("Нажмите для завершения игры");
            ShowTitle();
            TheEnd?.Invoke();
        }
示例#2
0
 private void frmSchool_FormClosing(object sender, FormClosingEventArgs e) => TheEnd?.Invoke(sender, e);
示例#3
0
 private void frmZbiorczaAnalizaOcen_FormClosed(object sender, FormClosedEventArgs e)
 {
     SharedConfiguration.ConfigurationChanged -= ApplyNewConfig;
     TheEnd?.Invoke(sender, e);
     conn.Dispose();
 }
示例#4
0
 private void frmObsada_FormClosing(object sender, FormClosingEventArgs e)
 {
     TheEnd?.Invoke(sender, e);
     AppUser.UserSettings.RaiseConfigChanged -= ApplyNewConfig;
 }
示例#5
0
 private void frmKontrolaNieobecnosci_FormClosed(object sender, FormClosedEventArgs e)
 {
     AppUser.UserSettings.RaiseConfigChanged -= ApplyNewConfig;
     TheEnd?.Invoke(sender, e);
 }
示例#6
0
 private void frmZbiorczaAnalizaOcen_FormClosed(object sender, FormClosedEventArgs e)
 {
     AppUser.UserSettings.RaiseConfigChanged -= ApplyNewConfig;
     TheEnd?.Invoke(sender, e);
 }
示例#7
0
 private void frmZbiorczyWykazEgzaminPoprawkowy_FormClosed(object sender, FormClosedEventArgs e)
 {
     AppUser.UserSettings.RaiseConfigChanged -= ApplyNewConfig;
     TheEnd?.Invoke(sender, e);
 }
示例#8
0
 private void frmZbiorczyWykazEgzaminPoprawkowy_FormClosed(object sender, FormClosedEventArgs e)
 {
     SharedConfiguration.ConfigurationChanged -= ApplyNewConfig;
     TheEnd?.Invoke(sender, e);
     conn.Dispose();
 }