private void end()
 {
     sw.Stop();
     timer.Stop();
     gc    = new Tetris.SPGameController(this, level, goalController);
     state = 0;
     pauseButton.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
     restartButton.Content  = "Start";
     levelSlider.Visibility = Windows.UI.Xaml.Visibility.Visible;
     levelText.Visibility   = Windows.UI.Xaml.Visibility.Visible;
 }
 private void end()
 {
     sw.Stop();
     timer.Stop();
     gc = new Tetris.SPGameController(this, level,goalController);
     state = 0;
     pauseButton.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
     restartButton.Content = "Start";
     levelSlider.Visibility = Windows.UI.Xaml.Visibility.Visible;
     levelText.Visibility = Windows.UI.Xaml.Visibility.Visible;
 }