Beispiel #1
0
 public SimonForm(string Ime)
 {
     InitializeComponent();
     g = new SimonGame();
     ime = Ime;
     countPoeni = 0;
     g.addNiza();
     maxpoeni = 0;
     i = 0;
     button1.Tag = "pocetno";
     button2.Tag = "pocetno";
     button3.Tag = "pocetno";
     button4.Tag = "pocetno";
     timer1.Start();
 }
Beispiel #2
0
        public void pobedena()
        {
            timer1.Stop();

            if (countPoeni > maxpoeni)
                maxpoeni = countPoeni;
            lblMax.Text = maxpoeni.ToString();
            player = new Igrach(ime,maxpoeni);
            countPoeni = 0;
            momentalnaPozicija = 0;
            DialogResult r = MessageBox.Show("Победивте! Дали сакате нова игра?", "Победа", MessageBoxButtons.YesNo);
            if (r == System.Windows.Forms.DialogResult.Yes)
            {

                g = new SimonGame();
                g.addNiza();
                i = 0;
                timer1.Start();
            }
        }
Beispiel #3
0
 private void nova_Click(object sender, EventArgs e)
 {
     timer1.Stop();
     DialogResult r = MessageBox.Show("Дали сакате нова игра?", "Победа", MessageBoxButtons.YesNo);
     if (r == System.Windows.Forms.DialogResult.Yes)
     {
         g = new SimonGame();
         g.addNiza();
         i = 0;
         timer1.Start();
     }
     else timer1.Start();
 }