This project is an implementation of the classic Hangman game using TypeScript. In this game, the player has to guess a hidden word by guessing letters until they either guess the word correctly or run out of attempts.
To play the Hangman game, follow these steps:
-
Initialize the game by running
npm start
. -
You will see the hidden word represented by underscores, e.g., "_ _ _ _ _ _ _".
-
Input a letter and press Enter.
-
If the letter is in the word, it will be revealed in its correct positions, e.g., "A _ _ _ A _ _".
-
If the letter is not in the word, your remaining attempts will decrease. You lose when you run out of attempts or correctly guess the entire word.
-
The goal is to guess the entire word before running out of attempts