Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change invocation order in Tower of Hanoi to match with animation #116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bharatagarwal
Copy link
Contributor

Currently, the animated solution of Tower of Hanoi moves the tower from the first pole to the last pole.

The invocation of move_tower with from_pole = A, to_pole = B, with pole = C moves the tower to the second pole instead. This difference in to_pole makes it confusing to reconcile the animation with the code.

@robot-dreams
Copy link
Collaborator

I agree that from_pole = A, to_pole = C is needed to agree with the animation. However the animation has a height of 4 (rather than 3). We can make this change too but do you think it's worth significantly increasing the length of the output to match the animation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants