private void Start_game_click(object sender, EventArgs e) // When starting button is clicked, then the game starts { button_start_game.Enabled = false; end_game = false; // Setting flag that the game isn't over Start_game?.Invoke(); screen.Invalidate(); // Refreshing the screen synchronously timer1.Interval = game_speed; // Setting the game speed timer1.Start(); // Launching a timer }
private void Button_start_game_Click(object sender, EventArgs e) { button_start.Enabled = false; scoreboard.Text = ("0"); Game_over = false; Start_game?.Invoke(); panel_field.Invalidate(); timer1.Interval = speed; timer1.Start(); }
private void button_start_game_Click(object sender, EventArgs e) { button_start_game.Enabled = false; end_game = false; Start_game?.Invoke(); panel1.Invalidate(); timer1.Interval = 700; timer1.Start(); }