Simulates and solves a "Tower of Hanoi" puzzle