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);
}