BattleShip.Form1.button_Click C# (CSharp) Method

button_Click() private method

begin the game
private button_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        void button_Click(object sender, EventArgs e)
        {
            button.Text = "Ready";
            button.Enabled = false;
            this.GameStarting = true;

            
            foreach (Ship s in this.ships)
            {
                this.platAlly.AddShip(s.GetCaseShip());        
            }

           this.ships.Clear();
            int[,] plat = this.platAlly.ToArrayGameboard();

            for (int i = 0; i < 10; ++i)
                for (int j = 0; j < 10; ++j)
                {
                    fm.writeBoard("PLATEAU-", "P1", i, j, plat[i,j]);
                }
        }