/// <summary>
 /// Exits the game.
 /// </summary>
 private void Exit()
 {
     MainGame.needsToExit = true;
     GameSounds.CloseSFX();
     this.Close();
     Application.Exit();
 }
 /// <summary>
 /// this happens when the form closes.
 /// </summary>
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (Settings.soundIsOn)
     {
         GameSounds.CloseSFX();
     }
     if (Settings.soundIsOn)
     {
         GameSounds.CloseMusic();
     }
     //Threads.initializeTasks();
     //Application.Exit();
 }