Пример #1
0
 // When the button is clicked it closes the window
 private void ButtonNextMoveClicked(object sender, RoutedEventArgs e)
 {
     //if the game is not solved
     //then move the disk
     //then update the towers view
     if (!HanoiObj.IsGameSolved())
     {
         HanoiObj.MoveDisks();
         Display_Towers_Status_Message(sender, e);
         UpdateTowersWithHanoi();
     }
     //else, just say we already solved the game
     else
     {
         MessageBox.Show("You have solved the Towers !");
     }
 }