/hangman-js

Primary LanguageJavaScript

Hangman Game

This is a simple command-line implementation of the classic Hangman game. The game randomly selects a word from a list of four programming languages and the player has to guess the letters of the word before running out of attempts.

Prerequisites

You need to have Node.js installed in your system to run this game.

How to play

To play the game, run the following command:

node hangman.js

You will be prompted to type "play" to start the game, "results" to see the scoreboard, and "exit" to quit. If you choose to play, you will be given a hidden word to guess and you have to input letters to uncover the word. If you guess a letter that is not in the word, you lose an attempt. If you run out of attempts, you lose the game.

License