Skip to content

AmalShalabi/Hangman-React-Typescript

Repository files navigation

Hangman Game with React and TypeScript Demo

This project is a web-based Hangman game built with React and TypeScript. The game is a classic word-guessing game in which players must guess letters to fill in the blank spaces of a secret word, while trying to avoid getting "hanged" by guessing too many incorrect letters.

Getting Started

To get started, you'll need to clone this repository onto your local machine:

git clone https://github.com/AmalShalabi/Hangman-React-Typescript.git

Next, navigate into the project directory and install the necessary dependencies:

cd Hangman-React-Typescript.git
npm install

Finally, start the development server:

npm run dev

How to Play

  • The player will be presented with a secret word, represented by blank spaces for each letter.
  • The player must guess a letter by clicking on one of the letter buttons on the screen.
  • If the letter is present in the secret word, it will be revealed in the appropriate blank space(s).
  • If the letter is not present in the secret word, a body part will be added to the hangman figure on the screen.
  • The player can keep guessing letters until they either solve the word or run out of guesses and lose the game.

Technologies Used

This game was built using the following technologies:

  • React
  • TypeScript
  • CSS

License

This project is licensed under the MIT License.

You can customize this template to fit your specific Hangman game implementation and add any additional sections as needed.