This is a simple Hangman game implemented in JavaScript. The game allows players to guess a word by guessing individual letters within a limited number of attempts. This README provides an overview of the game's features and how to run it.
- Random word generation for each game session.
- Visual representation of the hangman as incorrect guesses accumulate.
- Tracking of guessed letters and displaying them in the interface.
- Win/loss detection and appropriate messages displayed to the player.
- Ability to start a new game after completion.
Make sure you have the following installed:
- Node.js (for running the game in a terminal)
- A web browser (for running the game in a browser)
-
Clone this repository to your local machine:
git clone https://github.com/somil0701/jsHangman
-
Navigate to the project directory:
cd jsHangman
To play the game in your terminal, run:
node hangman.js
Follow the on-screen instructions to play the game.
Open index.html
in your web browser to play the game interactively in the browser.
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/your-feature-name
). - Create a new Pull Request.
This project is licensed under the MIT License.