Skip to content

Latest commit

 

History

41 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Tower of Hanoi

Introduction

The Tower of Hanoi is a mathematical game or puzzle consisting of three rods and several 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

Development

This implementation of the Tower of Hanoi game utilizes JavaScript and event listeners to create an interactive user experience. Upon initiating the game, users are prompted to specify the number of disks they wish to play with. The objective is to solve the puzzle within a predefined number of moves. Completing the game within the allowed move count results in a win, whereas exceeding this limit results in a loss.

Rules of the Game:

  • Only one disk can be moved at a time.
  • Only the disk at the top of a stack can be moved.
  • A disk cannot be placed on top of another disk with a smaller diameter.

Images

toh-form toh-game

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages