// Stops the game before the form is closed, and therefore before any exceptions can occur. private void GameWind_FormClosing(object sender, FormClosingEventArgs e) { game.stopGame(); }