tower-of-hanoi

Intro to the game

The Tower of Hanoi (also called The problem of Benares Temple or Tower of Brahma or Lucas’ Tower and sometimes pluralized as Towers, or simply pyramid puzzle) is a mathematical game or puzzle consisting of three rods and a number of disks of various diameters, which can slide onto any rod. The puzzle begins with the disks stacked on one rod in order of decreasing size, the smallest at the top, thus approximating a conical shape. The objective of the puzzle is to move the entire stack to the last rod, obeying the following rules:

(« Tower of Hanoi » 2022).

Bibliography : Tower of Hanoi. (12th April, 2022). In ​Wikipedia​. https://en.wikipedia.org/wiki/Tower_of_Hanoi

Playing

Two dimensions version

Three dimensions version

Made with ThreeJS.

Usage : Click on a disk to pick it, then click on a tower to place it.

URL : ThreeJS

Dev

Clone the projet, then

npm i
npm run dev

Care, if you want to work on a precise project, you have to change paths in server.js and webpack.config.js.