Skip to content

shayanfalla/Non-Blocking-Hangman-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Non-Blocking-Hangman-Game

This is the classic hangman game implemented on a non blocking server. This was part of an assignment during my third year in KTH.

An example of a game session is as follows:

Welcome (again) to the Hangman game made by Shayan Fallahian! (shayanf@kth.se)

Your total score so far is: 0

The word has 3 letters.

Lets begin!

Current state: _ _ _ 

You have 3 tries left.
Enter a letter or word! ('-' to quit)

a

Current state: _ _ _ 

You have 2 tries left.
Enter a letter or word! ('-' to quit)

e

Current state: _ _ _ 

You have 1 tries left.
Enter a letter or word! ('-' to quit)

b

You ran out of guesses.
Your final state was: _ _ _ 
Word was sky.

Do you want to play another game? (yes/no)

no

One could continue and rack up their score aswell if desired!

The output can be changed and formatted as you wish with ease as it is printed on the command line.

Enjoy!