title: How to increase the speed of a game by using a Timer?
body: <p>I am doing a simple C# clicker game, I know it is stupid to ask, but I'm still learning C# and I am asking you pros how do you make the timer interval go faster every button click?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>public partial class Form1 : Form
  {
      private int clicks = 0;
      private int counter = 1;
  
      public Form1()
      {
         InitializeComponent();
      }
  
      private void UpdateButton()
      {
          if (clicks &gt;= 50)
              button1.Enabled = true;
          else button1.Enabled = false;  
      }
  
      private void myDiamond_MouseUp(object sender, MouseEventArgs e)
      {  
          myDiamond.Image = Image.FromFile("C:\\Matej Dodevski\\Semos\\C#\\Diamond Clicker\\diamond.png");  
      }
  
      private void myDiamond_MouseDown(object sender, MouseEventArgs e)
      {
          myDiamond.Image = Image.FromFile("C:\\Matej Dodevski\\Semos\\C#\\Diamond  Clicker\\diamondMouseUp.png");
          clicks++;
          DiamondsScore.Text = "Diamonds: " + clicks.ToString();
          UpdateButton();
      }
  
      private void timer1_Tick_1(object sender, EventArgs e)
      {
          counter++;
  
          clicks = clicks + 1;
          DiamondsScore.Text = "Diamonds: " + clicks.ToString();
          UpdateButton();
      }
  
      private void button1_Click(object sender, EventArgs e)
      {
          clicks = clicks - 50;
          DiamondsScore.Text = "Diamonds: " + clicks.ToString();
          timer1.Enabled = true;
          UpdateButton();
          button1.Enabled = false;
      }
  }
  </code></pre>
  
  <p>Thanks.</p>