A modern take on the classic word-guessing game! Guess the hidden word one letter at a time before the hangman is fully drawn. Built with React and Vite for a smooth and interactive user experience.
Check out the live version here: Gallows Game.
- Random Word Selection: A new word is randomly chosen from the selected category for each game session.
- Interactive Letter Guessing: Intuitive interface with alphabet buttons to guess letters.
- Dynamic Hangman Animation: Canvas-based animations visually represent the hangman as the game progresses.
- Restart Functionality: A restart button resets the game and starts a new session.
- Smart Letter Tracking: Used letters are tracked and automatically disabled to prevent repeated guesses.
- Comprehensive Game Stats: Displays the number of attempts, wins, and losses in real-time.
- Category Selection Menu: A menu button allows players to choose a specific word category.
- Frontend library: React ^18
- Languages: JavaScript
- Animation library: Motion
- Store library: Zustand
- Build tool: Vite
Follow these steps to set up and run the project locally:
-
Clone the Repository git clone https://github.com/njordulv/gallows.git cd gallows
-
Install Dependencies Ensure you have Node.js installed, then run: npm install
-
Run the Application Start the development server: npm run dev
-
Build for Production To create an optimized build for deployment: npm run build
The production-ready files will be in the build/ directory.
- A random word is selected and displayed as underscores (_).
- Guess letters by clicking the buttons. • Correct guesses reveal the letter(s) in the word. • Incorrect guesses add a part to the hangman figure.
- You have 7 incorrect guesses before the game ends.
- Use the Restart button to reset the game and try again.
This project is licensed under the MIT License.
This project was bootstrapped with Vite.