NAME

wordguess - Word guess game

VERSION

This document describes version 0.091 of wordguess (from Perl distribution Games-Word-Guess), released on 2021-03-14.

SYNOPSIS

Run game:

 % wordguess ; # defaults: word length 5, 5 guesses/word, 10 words, wordlist EN::Enable (if running under English locale)

Customize some options (wordlist is WordList::* modules):

 % wordguess --min-len 5 --max-len 6 --num-words 5 --word-list ID::KBBI

Other options:

 % wordguess --help
 % wordguess --version

An example game session:

 % wordguess -w3

 Word 1/3:
 o  _  _  _  _  Your guess (1/5)? ovale
 o  _  _  _  _  Sorry, not a word! Your guess (1/5)? odors
 o  _  _  r  _  Your guess (2/5)? overt
 o  _  e  r  _  Your guess (3/5)? owers
 o  _  e  r  _  Sorry, not a word! Your guess (3/5)? o
 o  _  e  r  _  Sorry, not a word! Your guess (3/5)? our
 o  _  e  r  _  Sorry, not a 5-letter word! Your guess (3/5)?
 o  _  e  r  _  Sorry, not a word! Your guess (3/5)? otero
 o  _  e  r  _  Sorry, not a word! Your guess (3/5)? overt
 o  _  e  r  _  Your guess (4/5)? overt
 o  _  e  r  _  Your last guess? overt
 o  _  e  r  _  Chances used up. The correct word is: opera

 Word 2/3:
 g  _  _  _  _  Your guess (1/5)? grand
 g  r  _  _  _  Your guess (2/5)? greet
 g  r  _  _  _  Your guess (3/5)? groom
 g  r  _  _  _  Your guess (4/5)? grips
 g  r  _  _  s  Your last guess? grubs
 Correct (20 points)!

 Word 3/3:
 d  _  _  _  _  Your guess (1/5)? drives
 d  _  _  _  _  Sorry, not a 5-letter word! Your guess (1/5)? drive
 d  _  _  _  e* Your guess (2/5)? deers
 d  _  _  _  _  Sorry, not a word! Your guess (2/5)? dears
 d  _  _  _  _  Sorry, not a word! Your guess (2/5)? delve
 d  e* _  _  _  Your guess (3/5)? dream
 d  _  e* _  _  Your guess (4/5)? dared
 d  _  _  e  _  Your last guess? dunes
 d  _  _  e  s  Chances used up. The correct word is: dotes

 Number of words guessed correctly: 1/3
 Final score: 20

DESCRIPTION

wordguess is a word-guessing game, a variation on "Hangman". Like in Hangman, you must guess a word in a certain number of allowed guesses. Unlike in Hangman, you guess word-by-word, not letter-by-letter. The first letter is always revealed beforehand so you can have a better idea of the word. Also, unlike in Hangman, if there is a letter in the your guess word that exists in the answer word but at the wrong position, the game will not tell you the correct position but instead will display the letter in the guessed position with an accompanied * mark. This way, you know that the letter exists but at a different position.

Scoring. For each correctly guessed word, you get a score. The score depends on word length and number of guesses. For example, if you guess a 5-letter word correctly on the first guess, you get 100. On the second guess, 80. And so on.

OPTIONS

--min-len=i, -a (default: 5)

Minimum word length.

--max-len=i, -b (default: 5)

Maximum word length.

--max-guesses=i, -g

Maximum number of guesses per word. The default is the word length (so if you have a 6-character word, the default is 6).

--word-list=s, -l

Select wordlist. Wordlists are searched in WordList::* modules. Two default wordlist are used: ID::KBBI (if running under Indonesian locale), or EN::Enable (if running under English locale).

Only words containing the lowercase latin letter a-z are used.

--num-words=i, -w (default: 10)

Number of words per game.

HISTORY

First created as a Perl script on 2010-04-04. First packaged as a CPAN module on 2014-08-07.

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Games-Word-Guess.

SOURCE

Source repository is at https://github.com/perlancar/perl-Games-Word-Guess.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Games-Word-Guess

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2021, 2016, 2015, 2014 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.