Skip to content

seorgiy/hangman-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hangman

Hello!

This is a console version of popular game Hangman. Made in Ruby 🔥
Please note: only russian in game language supported.

How to use

One simple command in root directory:

ruby main.rb

Rules

The word to guess is represented by a row of dashes, representing each letter of the word.
Proper nouns, such as names, places, and brands, are not allowed.
Slang words, sometimes referred to as informal or shortened words, are also not allowed.
If the player suggests a letter which occurs in the word, the program writes it in all its correct positions.
If the suggested letter does not occur in the word, the program draws one element of a hanged man stick figure as a tally mark.
If the player have guessed all the letters of the word — player wins
If the player made 7 failed attempts — the game is lost

How to add new words

Edit the file words.txt in data directory

The sample of interface


Слово: К О __ О __ __
         _______
         |/
         |     ( )
         |      |
         |
         |
         |
         |
         |
       __|________
       |         |

Ошибки (2): Х, У
У вас осталось ошибок: 5

Введите следующую букву:

About

The console version of the Hangman game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages