Towers of Hanoi - giving help to the user mid game

安稳与你 提交于 2019-12-10 12:13:40

问题


I have successfully built the Tower of Hanoi game in java with user interactivity.

However, I also want to add a feature where if the user asks for hint, the program does the next move for the user in the most efficient way.

I know the game can be solved using recursion but as far as I know, I can't use recursion mid-game to give answers.

Do you guys have any suggestions?

来源:https://stackoverflow.com/questions/21668424/towers-of-hanoi-giving-help-to-the-user-mid-game

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!