Skip to content
This repository has been archived by the owner on Jan 9, 2022. It is now read-only.
/ Hangman Public archive

C command-line Hangman game.

Notifications You must be signed in to change notification settings

ronanboiteau/Hangman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hangman

C command-line Hangman game.

Requirements

Compilation

Navigate to the root of the repository from your Terminal and run make to build the hangman executable file.

How to use Hangman?

The hangman executable expects a dictionary file as argument.

Example:

./hangman samples/dict1.txt

Hangman will import the dictionary file & select a random word from it. Then it will show you the word & your tries left, and ask you to input a letter.

Beginning of a game example:

*******
Tries: 10
Your letter: a
a is not in the word.

*******
Tries: 9
Your letter: e

*e*****
Tries: 9
Your letter:

Dictionary files format

You can find dictionary files samples in the samples/ folder.

A dictionary is basically a list of word separated by new lines (\n).

Example:

hospitality
chance
divorce
ensure
embrace
corner
middle
deposit
knock
instrument