Skip to content

ShouryaPant/Hangman-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hangman-Game BY SHOURYA PANT!!

I have created this hangman game project using "Python Programming language". I have used certain libraries like pygame and random. Basically we all know what the Hangman Game actually is Still I give a brief intro about this game, In this game there is a randomly generated word and the user tries to make guesses about the letters that the game can have. If the user guesses all the letters in a given word CORRECTLY, the user is the WINNER!. Otherwise the user loses the game.

INITIALIZTION OF GAME

First created a words.txt file that will be used by our program to parse through and then from that file a randomised word will be generated and stored in a dictionary then we will find the total length of the word and add len(word) number of dashes("-") then the GAME BEGINS!!

We have also initialized some amounts of fonts variables or some colours that we will use in our pygame window.

THE GAME BEGINS:-->

Now the user starts guessing the letters of the randomly generated word one by one the correct letters will fill up the blank spaces or the dashes and the wrong words will lead to formation of our hangman body.

THE WINNER!!

If the user correctly guesses all the letters that are present in the randomly generated word and fill up all the black spaces or dashes("-"), the user is the WINNER!!

THE LOSER!!

If the user makes 6 to 7 incorrect guesses and unable to correctly guess the word the user loses the game!

Thank You

Now Lets start Playing!! Can You guess it CORRECTLY??