[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 2


hangman Command

Purpose

Starts the hangman word-guessing game.

Syntax

hangmanFile ]

Description

The hangman command chooses a word of at least seven letters from a standard dictionary. The File parameter specifies an alternate dictionary. You guess the word by guessing letters one at a time. You are allowed seven mistakes.

When you start hangman, the game displays:

guesses: word: ....... errors: 0/7
guess:

The guesses displays the letters you have used as guesses. Every letter you guess is listed after guesses. The word: ....... displays the number of letters in the mystery word. In this case there are seven . (periods) so there are seven letters in the word. As you correctly guess letters, the game replaces the appropriate . with the correct letter. The errors: 0/7 displays the number of incorrect guesses. You enter your letter guess at the guess: prompt. For example:

guesses: word: .......... errors: 0/7
guess: q
guesses: q word: .......... errors: 1/7
guess: a
guesses: aq word: .a....a... errors: 1/7
guess: b
guesses: abq word: .a....a... errors 2/7
guess: j
guesses: abjq word: .a....a... errors: 3/7
guess: s
guesses: abjqs word: .a....a..s errors: 3/7
guess: z
guesses: abjqsz word: .a....a..s errors: 4/7
guess: y
guesses: abjqsyz word: .a....a..s errors: 5/7
guess: k
guesses: abjkqsyz word: .a....a..s errors: 6/7
guess: x
the answer was calculates, you blew it

To quit the game, press the Interrupt (Ctrl-C) or End Of File (Ctrl-D) key sequence.

Files


/usr/games Location of the system's games.

Related Information

The arithmetic command, back command, bj command, craps command, fish command, fortune command, moo command, number command, quiz command, ttt command, turnoff command, turnon command, wump command.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]