Hangman is a paper and pencil guessing game for two or more players. One player thinks of a word, phrase or sentence and the other tries to guess it by suggesting letters or numbers, within a certain number of guesses. In this version for children the computer selects a word, phrase or sentence randomly out of a word-list defined in a configuration file. In the course of the game ASCII-Art images - designed for children - are progressively disclosed. There are 10 built in ASCII-Art images from which one is chosen randomly at the beginning of the game. Alternatively own ASCII-Art can be provided in the configuration file.

Example 1. Screenshot
HANGMAN GAME
         ,.
        (_|,.
       ,' /, )_______
    __j o``-'        `
   (")
    `-j                |
      `-._(           /
         |_\  |--^.  /
        /_]'|_| /_)_/
           /_]'  /_]'

Lives:  6       Last guess: g

 g o o d   l u _ k

Type a letter then type [Enter]:

The project is hosted on Github: getreu/asciiart-hangman-for-kids.rs. The project’s webpage is on getreu.net. There you also find a pdf rendition of this document and compiled binaries.

Installation

Linux

  1. Download the binary hangman from here.

  2. Copy it in $PATH

    sudo cp hangman /usr/local/bin
  3. Generate a sample configuration file in your working directory

    hangman
  4. Edit the configuration file

    nano hangman-words.txt
  5. Start the game

    hangman

Windows

  1. Download and install the terminal-emulator ConEmu from here.

  2. Download the binary hangman.exe from here.

  3. Copy hangman.exe in a directory of your choice, for example c:\99-tools\

  4. Open the properties of the Shortcut ConEmu (x64) on your desktop.

    01a Shortcut properties
  5. On the General tab, change the program name to Hangman for kids.

    01b Shortcut properties2
  6. Append "C:\99-tools\hangman.exe" to ConEmu64.exe

    02 Target

    Leave Start in empty.

  7. Generate a sample configuration file on your desktop with double click on the Hangman for Kids Shortcut on your desktop.

  8. Edit the configuration file with Wordpad.

  9. Start the game with double click on the Hangman for Kids Shortcut on your desktop.

    03 Terminal

Usage

Unresolved directive in index.adoc - include::src/main.rs[lines="48..82"]

Sample configuration file

Unresolved directive in index.adoc - include::src/main.rs[lines="93..138"]