private void VstupniInformaceButton_Click(object sender, EventArgs e)
        {
            SeznamVstupnichInformaci MySVI = new SeznamVstupnichInformaci();

            MySVI.JmenoObrance = JmenoObrance.Text;
            MySVI.JmenoUtocnika = JmenoUtocnika.Text;

            MySVI.JeObrancePocitacovyHrac = obranaComboBox.SelectedIndex == 1;
            MySVI.JeUtocnikPocitacovyHrac = utokComboBox.SelectedIndex == 1;

            DialogResult = DialogResult.OK;
            Close();

            SVI = MySVI;
        }
Exemple #2
0
        private void NastavPocatecniInformace(SeznamVstupnichInformaci SVI)
        {
            if (SVI.JeUtocnikPocitacovyHrac)
            {
                ManazerHry.Utocnik = new AI(SVI.JmenoUtocnika, Manazer.StavPole.utok, 3);
            }
            else
            {
                ManazerHry.Utocnik = new LidskyHrac(SVI.JmenoUtocnika);
            }

            if (SVI.JeObrancePocitacovyHrac)
            {
                ManazerHry.Obrance = new AI(SVI.JmenoObrance, Manazer.StavPole.obrana, 3);
            }
            else
            {
                ManazerHry.Obrance = new LidskyHrac(SVI.JmenoObrance);
            }

            NastavPocatecniInformace();
        }