Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/njordulv/gallows
This is a simple hangman game created with React, Motion & Zustand. Deployed on Netlify
https://github.com/njordulv/gallows
gallows-game javascript motion netlify reactjs vite zustand
Last synced: 16 days ago
JSON representation
This is a simple hangman game created with React, Motion & Zustand. Deployed on Netlify
- Host: GitHub
- URL: https://github.com/njordulv/gallows
- Owner: njordulv
- License: mit
- Created: 2024-12-13T17:25:00.000Z (24 days ago)
- Default Branch: main
- Last Pushed: 2024-12-21T11:47:52.000Z (17 days ago)
- Last Synced: 2024-12-21T12:31:26.743Z (16 days ago)
- Topics: gallows-game, javascript, motion, netlify, reactjs, vite, zustand
- Language: JavaScript
- Homepage: https://njordulv-gallows.netlify.app/
- Size: 845 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gallows Game
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.## Link Demo
Check out the live version here: [Gallows Game](https://njordulv-gallows.netlify.app).
## Features
- **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.## Technologies
- **Frontend library:** React ^18
- **Languages:** JavaScript
- **Animation library:** Motion
- **Store library:** Zustand
- **Build tool:** Vite## Installation
Follow these steps to set up and run the project locally:
1. Clone the Repository
git clone https://github.com/njordulv/gallows.git
cd gallows2. Install Dependencies
Ensure you have Node.js installed, then run:
npm install3. Run the Application
Start the development server:
npm run dev4. Build for Production
To create an optimized build for deployment:
npm run buildThe production-ready files will be in the build/ directory.
## How to Play
1. A random word is selected and displayed as underscores (\_).
2. Guess letters by clicking the buttons.
• Correct guesses reveal the letter(s) in the word.
• Incorrect guesses add a part to the hangman figure.
3. You have 7 incorrect guesses before the game ends.
4. Use the Restart button to reset the game and try again.## Screenshot
![Gallows Game Screenshot](./public/screenshot.jpg)
## License
This project is licensed under the [MIT License](LICENSE).
This project was bootstrapped with [Vite](https://vite.dev/).