BattleShip.Form1.Form1_Load C# (CSharp) Метод

Form1_Load() приватный Метод

create the different gameboard with the label associate, add the game button add the boats
private Form1_Load ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void
        private void Form1_Load(object sender, EventArgs e)
        {

            //this.fm = new FileManager(PATH, "Bob");
            // fix the size of the form compared to the size of one case 
            this.Size = new System.Drawing.Size(XFORM * size, YFORM * size);
            this.GameStarting = false;

            // creation of new gameboard for the battleship
            platAlly = new GameBoard("Your field", 10, 10);
            platEnemy = new GameBoard("Enemy field", this.platAlly.Size.Width + 150, this.platAlly.Location.Y);

            // add button
            gameButton();

            // boats
            for (int i = 0; i < NITEMBOAT; i++)
            {
                // 3 mines
                if (i < NMINES)
                {
                    nShip = 0;
                }
                else
                {
                    nShip = i - 2;
                }
                ships.Add(new Ship(nShip, size, new Point(size, (size + 10) * i)));
            }
            gameInProgress = true;
            //GameFinish("Victoire !", Color.Green);

            //fm = new FileManager(PATH, PSEUDO);

        }