Skip to content

codanMartin/hangman-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hangman (JavaScript)

Hangman is a popular yet grim puzzle game. A cruel computer hides a word from you, which you try to guess letter by letter. If you fail, you'll be “hanged”. If you win, you'll survive. You’ve probably played the game at least once or twice. Now you can actually create this game yourself!

▶️ Stage 1/8: Hello, Hangman

Welcome the user and print “The game will be available soon”.

▶️ Stage 2/8: Let’s play a game

At this stage, the player will have only one chance to guess the word. Learn how to use “Input” and “if” to implement the most basic version of the game.

▶️ Stage 3/8: Make your choice

Make the game more challenging! Now it will randomly choose one of four words from a list.

▶️ Stage 4/8: Help is on the way

Enable hints in your game. Allow it to show the number of letters and the first three letters. Slicing will help you to implement this part.

▶️ Stage 5/8: Keep trying

Using a loop, extend the number of attempts to eight. Now we’re talking!

▶️ Stage 6/8: The value of life

The outcome of the game may be “fatal”: a feature that makes the game all the more exciting. Work on implementing this feature so that players don’t lose “lives” if they guess the letter correctly. The While loop will help.

▶️ Stage 7/8: Error!

Improve the game by handling different error cases. Repetition of a letter, entering words that are too long, or using non-Latin characters shouldn’t cost your player a life.

▶️ Stage 8/8: Menu, please

Dinner at a restaurant starts with the menu; our project ends with one. Create a menu for your game so that players can replay it or exit.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published