Design process involves design of algorithm and modules. The algorithm obtained from [5] has been used by adding one more module to it which records the movement of disk at each step. implementation can be divided into 2 parts.
1. Running the algorithm and recording disk movements.
2. Using the recorded data to create the display.
The tower of Hanoi algorithm is allowed to execute initially and the movement of disk at each step is recorded. The data structure called linked list is used for this purpose. Each node in the list corresponds to one step in the solution to the puzzle. Hence each node contains information as from where to where the disk has to be moved.
After executing the algorithm the linked list will contain the movement of disk at each stage which is then traversed with some constant time delay. After visiting each node the data in it is read and the disk movement is depicted by updating the three stack variables
each of which represents one pole and contains the information like how many and which all disks are there on that particular pole, at what height, what are the colours of each disk etc.
These stack variable are then later read and display is created.
Both the above mentioned units are integrated to completely give us the graphics application.