Skip to content

RuggeroPiazza/hanoi_tower_solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

hanoi_tower_solver

This little program is part of a list of programs created to practice on recursive functions.

The Hanoi tower game is a puzzle game where, given a x number of disks and 3 rods, the goal is to transfer the all stack of disks from a rod to another one, obeying few simple rules. For a full description of the game, please click on the link below: https://en.wikipedia.org/wiki/Tower_of_Hanoi

The program takes as an input an integer indicating the number of disks to start with. Using a recursive function, the program returns a series of on-screen-instructions on how to solve the puzzle. The rods are named 'A' (left rod), 'B' (middle rod) and 'C' (right rod).

I hope you find this script useful and please feel free to let me know your opinion and ideas to improve this program. Cheers. Ruggero Piazza

About

A program to solve the Hanoi Tower game

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages