// 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 !"); } }
public string Get(int number, string source, string aux, string destination) { Hanoi h = new Hanoi(); return h.MoveDisks(number, source, aux, destination); }