Constant ascii_hangman::COMMANDLINE_HELP[][src]

pub(crate) const COMMANDLINE_HELP: &str = r#"
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.

```
-----------------------------------
    ASCII-ART HANGMAN FOR KIDS

             ,.
            (_|,.
           ,' /, )_______
        __j o``-'        `
       (")
        `-j                |
          `-._(           /
             |_\  |--^.  /
            /_]'|_| /_)_/
               /_]'  /_]'

    Lifes:  1       Last guess: 3

     g o o _ _ l _ _ k

    Type a letter then type [Enter]:
-----------------------------------
```

```
    Usage: ascii-hangman
           ascii-hangman [FILE]
           ascii-hangman -h|--help
           ascii-hangman -V|--version
```

`[FILE]` are configuration files containing one word-list hereafter referred to as "secrets" and
optionally one Ascii-Art image.

When no `[FILE]` argument is given, `[FILE]` defaults to `ascii-hangman-words.txt`. In case no
`[FILE]` is found, a template configuration file `ascii-hangman-words.txt` is written into the
current working directory. Multiple `[FILE]`s are concatenated.

`[FILE]` is a UTF-8 YAML formatted file containing 3 different variables:

- `secrets:` is an array of secrets, one per line. A secret is a string, that interprets the `|`
  character as newline and the `_` character as visibility switch. This switch allows to
  disclose a part of the secret when the game starts.
- `traditional:` is an optional boolean variable indicating how the ASCII-art image should be
  disclosed:
  * `true`: the image gets disclosed with every lost life,
  * `false`: the image gets disclosed with every guessed character (default).
- `image: |1` is an optional multiline string providing own ASCII-art. When missing, built-in
  ASCII-art is chosen randomly.
- Lines starting with `#` are ignored.

Example:

```
secrets:
 - guess me
 - "guess me: with colon"
 - line| break
 - _disclose _partly

  # The following is optional.
 traditional: false
  # Optional ASCII-art lines start with 1 space ' '.

 image: |1
    ::
  C|__|
```

A traditional (not built-in) configuration could look like this:

```
secrets:
- guess me
- _good l_uck
- "_der Hund:_| the dog"
- _3*_7_=21_

traditional: true

image: |1
  ______
  |    |
  |    O
  |   /|\
  |    |
  |   / \
__|_____
|      |___
|_________|

```

When the word `secrets` is not found in `[FILE]`, _ASCII-Hangman_ switches into backward
compatibility mode, allowing to use old non-YAML configuration files without modification.
To learn more about the YAML format visit: <https://en.wikipedia.org/wiki/YAML>
"#;
Expand description

Text to show as command-line help –help