private void consultasToolStripMenuItem_Click(object sender, EventArgs e) { Form f2 = new Form2(); f2.Show(); }
private void timer1_Tick(object sender, EventArgs e) { if (plateau.plo.Count() == 0) { System.IO.File.WriteAllText(@"svg.txt", Convert.ToString(mapi + 1)); if (mapi + 1 == 6) { Form5 Form5 = new Form5(); Form5.Show(); this.Hide(); timer1.Enabled = false; } else if (mapi + 1 < 8) { Form1 Form1 = new Form1(mapi + 1, plateau.player[0].nbBombe, plateau.player[0].porteBombe, plateau.player[0].point); Form1.Show(); this.Hide(); timer1.Enabled = false; } } if (plateau.player.Count() == 0 && mapi != 7) { Form3 Form3 = new Form3(); Form3.Show(); this.Hide(); timer1.Enabled = false; } if (plateau.player.Count() == 1 && mapi == 7) { if (pointP1 == 100 && pointP2 == 100) { timer1.Stop(); MessageBox.Show("egaliter"); Form2 Form2 = new Form2(); Form2.Show(); this.Hide(); } else if (pointP1 == 100) { timer1.Stop(); MessageBox.Show("P1 Win"); Form2 Form2 = new Form2(); Form2.Show(); this.Hide(); } else if (pointP2 == 100) { timer1.Stop(); MessageBox.Show("P2 Win"); Form2 Form2 = new Form2(); Form2.Show(); this.Hide(); } else { Form1 Form1 = new Form1(7, 1, 1, pointP1, pointP2); Form1.Show(); this.Hide(); timer1.Enabled = false; } } int i = 0; while (plateau.boom.Count() > i) { plateau.boom[i].time--; if (plateau.boom[i] != null && plateau.boom[i].time < 0) { plateau.defla(plateau.boom[i]); plateau.boom.Remove(plateau.boom[i]); } i++; } i = 0; while (plateau.defl.Count() > i) { int j = 0; while (j < plateau.player.Count) { if (plateau.defl[i].getDeflagration(plateau.player[j].pos.x, plateau.player[j].pos.y)) { if (j == 0) { pointP2 += 10; } else if (j == 1) { pointP1 += 10; } plateau.player.Remove(plateau.player[j]); } j++; } j = 0; int m = 1; while (j < plateau.plo.Count()) { if (plateau.defl[i].getDeflagration(plateau.plo[j].pos.x, plateau.plo[j].pos.y)) { plateau.plo.Remove(plateau.plo[j]); plateau.player[0].point += 10 * m; m++; } j++; } if (plateau.defl[i] != null && plateau.defl[i].time < 1) { plateau.defl.Remove(plateau.defl[i]); } else { plateau.defl[i].time--; } i++; } for (int k = 0; k < plateau.plo.Count(); k++) { int l = 0; while (l < plateau.player.Count()) { if ((plateau.player[l].pos.x == plateau.plo[k].pos.x && plateau.player[l].pos.y == plateau.plo[k].pos.y)) { plateau.player.Remove(plateau.player[l]); } l++; } plateau.plo[k].ia(plateau); } affGame(); }
private void btntambah_Click(object sender, EventArgs e) { Form2 f2 = new Form2(); f2.Show(); }
private void button2_Click(object sender, EventArgs e) { Form2 form = new Form2(this, textBox1.Text); form.Show(); }
private void button2_Click(object sender, EventArgs e) { Form2 f2 = new Form2(); f2.Show(); }
private void button1_Click(object sender, EventArgs e) { Form2 form2 = new Form2(accno, cardno, pin); form2.Show(); }
private void button3_Click(object sender, EventArgs e) { this.Hide(); myform.Show(); }