Skip to content

poojan-2601/Hangman_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Hangman_game

HangMan

Problem Statement

Hangman is a popular word guessing game where the player attempts to build a missing word by guessing one letter at a time. After a certain number of incorrect guesses, the game ends and the player loses. The game also ends if the player correctly identifies all the letters of the missing word.

About

It is a command line based game developed in java in which player has 5 lives to guess the word.

Rules of the game

  • Random word is selected from a list of words using API https://random-word-api.herokuapp.com/word?number=10

  • The user will get only 5 lives to play the game

  • Initially the user is shown “” (underscore) in the console for each letter in the word. For example, if the word is “banana”, user will see “ _ _ _ _ _”

  • For every correct letter guess, replace the “” (underscore) with the letter. For example, if user guessed “n”, user will see “ _ n _ n _”

  • If the user guesses the same letter again, don’t do anything and continue with the game. For example, if the user guessed “n” again, show “_ _ n _ n _” and continue.

  • For every incorrect guess, reduce the number of lives by 1

  • The game ends when the user guesses the word correctly or there are no lives remaining.

Screen Shots

Screenshot from 2022-01-08 20-52-35 Screenshot from 2022-01-08 20-53-14 Screenshot from 2022-01-08 20-53-43 Screenshot from 2022-01-08 20-53-48 Screenshot from 2022-01-08 20-53-53

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages