Welcome to the Hangman Game! This is a classic word-guessing game implemented in React, where players guess letters to figure out a hidden word before running out of chances.
- Dynamic Gameplay: Random words are chosen for each game, making every playthrough unique.
- Interactive UI: Clickable letters on a virtual keyboard, with incorrect letters disappearing from the keyboard.
- Visual Feedback: A hangman figure progressively builds as incorrect guesses accumulate.
- Status Updates: Displays current game status, whether in progress, won, or lost.
To get started with the Hangman Game, follow these instructions:
- Node.js: Ensure you have Node.js installed. You can download it from nodejs.org.
-
Clone the Repository
git clone https://github.com/1blckhrt/hangman-react
-
Navigate to the Project Directory
cd hangman-react
-
Install Dependencies
npm install
-
Start the Development Server
npm run dev
-
Enjoy the Game!
- Your Hangman Game should now be running at
http://localhost:5173
!
- Guess a Letter: Click on a letter in the virtual keyboard to guess.
- View Progress: The game will reveal correct guesses and display the current status of the hidden word.
- Track Incorrect Guesses: The hangman figure will progressively build with each incorrect guess. You have a limited number of incorrect guesses before the game is lost.
- Game Status: Displays the current status of the game (In Progress, Won, or Lost).
- Hangman Figure: Displays each part of the hangman figure.
- Word Display: Displays the word letter blanks.
You can customize the game by modifying the following files:
src/utils/constants.ts
: Update the list of words or game messages.src/utils/helpers.ts
andsrc/pages/Home.tsx
: Adjust game logic or add new features.src/styles/Home.css
: Change the styling of the game interface and keyboard.
- Contributions are welcome! Please fork the repository and submit a pull request with your improvements or bug fixes.
- This project is licensed under the MIT License. See the
LICENSE
file for details.