Homework 2 builds on the Towers of Hanoi that we discussed in class. First of all, you are to implement the Towers problem in Java. Then, you are going to add a console display of the towers problem as it is being solved. This must be done in a way such that it runs on Turing in SSH. So, use ASCII graphics to represent the poles and discs. Ex:
=
==
===
====
A B C
or
1
2
3
4
A B C
Note: the former example would get an extra point for the difficulty of the display, but only if it was done correctly.
If it helps, you can display it on its side, like:
A 4 3 2 1
B
C
Then you can show the position of each disc every time it is moved. I want to see every step, so you might need to put some sort of delay in the program whenever there is a print so that the current state can be seen. Also, allow the user to specify the number of discs. That makes way for our final part, timing and move counting. I want the runtime of the entire program, excluding the print and delay times. Also, count up the number of moves it takes to reach the goal. The goal will always be to move all the discs from A to B. I will leave the error handling up to you.