/hangman-game

Hangman Game - An introduction to TypeScript, using the classic hangman game as a canvas to implement fundamental TypeScript features.

Primary LanguageTypeScript

Hangman Game in TypeScript

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.

How to Play

To play the Hangman game, follow these steps:

  1. Initialize the game by running npm start.

  2. You will see the hidden word represented by underscores, e.g., "_ _ _ _ _ _ _".

  3. Input a letter and press Enter.

  4. If the letter is in the word, it will be revealed in its correct positions, e.g., "A _ _ _ A _ _".

  5. 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.

  6. The goal is to guess the entire word before running out of attempts