<!--
    Developer: Molla Samser
    Organization: RSK World
    Website: https://rskworld.in
    Email: help@rskworld.in, support@rskworld.in
    Phone/WhatsApp: +91 93305 39277
    Address: Nutanhat, Mongolkote, Purba Burdwan, West Bengal, India, 713147
    Copyright © 2026 RSK World. All rights reserved.
-->
# Tower of Hanoi Game

A classic Tower of Hanoi puzzle game implemented with HTML5, CSS3, and JavaScript.

## Game Details

- **Title**: Tower of Hanoi
- **Description**: Move all the disks from one rod to another following specific rules.
- **Category**: Puzzle
- **Difficulty**: Intermediate
- **Tags**: Logic, Strategy

## Features

- Multiple disk levels (3-7 disks)
- Move counter and real-time timer
- Undo/Redo with move history panel
- Auto-solve (optimal) from fresh start
- Best scores saved per disk count (moves and time)
- Mute toggle with subtle sound effects
- Keyboard accessibility (1/2/3 to select towers, arrows to navigate, Enter/Space to pick/place)
- ARIA live announcements and focus-visible outlines
- Responsive design and smooth animations
- Win modal with stats and next level

## How to Play

1. **Objective**: Move all disks from the leftmost tower to any other tower.
2. **Rules**:
   - Only one disk can be moved at a time
   - A larger disk cannot be placed on top of a smaller one
   - Click or press Enter/Space on a tower to pick/place the top disk
   - Use keys 1, 2, 3 to interact with towers quickly
   - Use Left/Right arrows to move focus across towers
   - Press U to undo, R to redo, N for new game, H to toggle history, M to mute

## Setup Instructions

1. Make sure you have a web server installed (like XAMPP, WAMP, or Laragon)
2. Clone this repository to your web server's root directory
3. Open your web browser and navigate to:
   ```
   http://localhost/games/html5-games/tower-of-hanoi/game/
   ```
   (Adjust the path based on your server configuration)

## Controls and UI

- New Game: resets with current disk count
- Disk Count: choose 3-7 disks (persists)
- Undo / Redo: step backward/forward through moves
- History: toggle panel showing chronological move list
- Mute: toggles sound effects (persists)
- Solve: runs optimal solution from a fresh board

## Performance and Accessibility

- Minimal DOM operations, simple CSS animations
- Accessible roles, labels, and live region updates
- Keyboard friendly and mobile responsive

## Game Controls

- **New Game**: Restarts the game with the current disk count
- **Disk Count**: Select the number of disks (3-7)

## Technologies Used

- HTML5
- CSS3
- JavaScript (ES6+)
- Font Awesome (for icons)

## Browser Support

- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Mobile browsers (responsive design)

## Customization

You can customize the game by modifying:
- `styles.css` for colors and layout
- `game.js` for game logic and behavior
- `index.html` for the game structure

## License

This project is open source and available under the [MIT License](LICENSE).

## Screenshots

![Game Screenshot](tower-of-hanoi.png)

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## Author

RSK World

## Support

For support, licensing, or custom development inquiries:

- Email: help@rskworld.in
- Phone/WhatsApp: +91 9330539277
- Website: RSK World
- Business Inquiries: help@rskworld.in
- 🤝 Contributing

## Paid License (Pro)

Pro removes ads and unlocks premium features.

How to activate:
1. Click the "Go Pro" button in the game.
2. Enter your license key and press Verify.
3. If verification succeeds, ads will be removed and Pro is enabled.

Server-side validation:
- The app posts the key to `verify-license.php`.
- If the endpoint is unavailable, the app accepts the key in offline mode.
- Replace the offline behavior as needed.

Generating keys:
- Contact RSK World for licensing: help@rskworld.in

## Version

1.0.0
