Esempio n. 1
0
 private void BtnNewGame_Click(object sender, EventArgs e)
 {
     Count1     = 4;
     Count2     = 3;
     Count3     = 2;
     Count4     = 1;
     TotalCount = 0;
     ShipIsHorisontal.Checked = true;
     Btn1cells.Checked        = true;
     orientation              = 1;
     dataGridView2.Visible    = false;
     GroupBox.Visible         = true;
     ShipIsHorisontal.Visible = true;
     ShipIsVertical.Visible   = true;
     Sea.ClearSea(FriendlySea);
     Sea.ClearSea(EnemySea);
     UpdateSea(FriendlySea, dataGridView1, true);
     UpdateSea(EnemySea, dataGridView2, false);
     ships1.Text           = Convert.ToString(Count1);
     ships2.Text           = Convert.ToString(Count2);
     ships3.Text           = Convert.ToString(Count3);
     ships4.Text           = Convert.ToString(Count4);
     EndText.Visible       = false;
     BtnNewGame.Visible    = false;
     BtnClean.Visible      = true;
     dataGridView1.Enabled = true;
     dataGridView2.Enabled = true;
 }
Esempio n. 2
0
 private void BtnClean_Click(object sender, EventArgs e)
 {
     Sea.ClearSea(FriendlySea);
     UpdateSea(FriendlySea, dataGridView1, true);
     Count1      = 4;
     Count2      = 3;
     Count3      = 2;
     Count4      = 1;
     TotalCount  = 0;
     ships1.Text = Convert.ToString(Count1);
     ships2.Text = Convert.ToString(Count2);
     ships3.Text = Convert.ToString(Count3);
     ships4.Text = Convert.ToString(Count4);
 }