Hangman Game is a project built using React and Typescript to stimulate the hanging man game. Players are allowed 6 guesses to figure out the word before the hangman passes away.
Key features:
- Fetch random words from a dataset of common English words corpora
- Keep track of successfully guessed words using word illustration
- Style the hanging man based on the number of false guesses
- Support user-friendly interface for playing and enjoying the game
- Set up
- Play
The word is fetched from a corpora of English common words.
Here, the sample word is "money"
In each choice, if you are correct, the letter will appear. (click "M")
If not, you will be punished. (click "K")
-
Iterate
-
Win
Or Lose
To run the Hangman Game locally, follow these steps:
-
Clone the repository or download the source code.
git clone https://github.com/lvhoaa/ReactTS_HangmanGame.git
-
Navigate to the project directory in your terminal.
-
Install the dependencies by running the following command:
npm install
-
Set up the environment variables. Create a .env file in the root directory and add the necessary configuration variables such as database connection details, API keys, and any other required settings.
-
Run the application using the following command:
npm run dev
-
Open your web browser and visit http://localhost:5173 to access the Hangman Game server.
Contributions to this project are welcome! If you have any suggestions, bug fixes, or new features to propose, please open an issue or submit a pull request.
This project is licensed under the MIT License. You can find the full license text in the LICENSE file.