The goal is to move all discs from tower A to tower C in the fewest possible moves. The discs must be moved one at a time, stacking smaller discs on top of larger discs.
-
- MVP (Minimum Viable Product): Working game logic and minimal UI
- Game board starts with three towers and a variable number of discs between 3 and 8 inclusive
- Discs begin on tower A, stacked in increasing width from bottom to top
- Player can move a disc to any tower, provided there are no discs on the destination tower, or the top most disc on the destination tower is larger in width than the disc to move
- When all discs have been moved from tower A to tower C, the game is over
- Number of moves to achieve a winning game is calculated
- Number of minimum moves for a given number of discs is calculated
- MVP (Minimum Viable Product): Working game logic and minimal UI
-
- Add time-based scoring to MVP, which calculates the duration of a winning game
- Track scores across games (even if the page is reloaded)
- Basic UI as shown above, with click-based events to transfer discs between towers
-
- Polished UI with animations like the UI shown below
- Class-based design
- Classes for Disc, Tower, and Gameboard
- Strict Encapsulation - Private properties ONLY! Getters and Setters employed exclusively for the main application's consumption.
- Extensive error checking with TRY / THROW / CATCH
- Main js file acts as an entry point into the application and includes all class files
- JSDoc documentation for the source files located here
- JavaScript
- HTML
- CSS
- Google Fonts