Title: | Word Puzzle Game |
---|---|
Description: | The word puzzle game requires you to find out the letters in a word within a limited number of guesses. In each round, if your guess hit any letters in the word, they reveal themselves. If all letters are revealed before your guesses run out, you win this game; otherwise you fail. You may run multiple games to guess different words. |
Authors: | Xiurui Zhu [aut, cre], @olivory [ctb] (Add `URL` and `BugReports` fields to `DESCRIPTION`.) |
Maintainer: | Xiurui Zhu <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.1 |
Built: | 2024-11-21 02:48:24 UTC |
Source: | https://github.com/zhuxr11/wordpuzzler |
config_game
configures wordPuzzleR, or show current configuration
when used with no arguments.
config_game(..., .verbose = TRUE)
config_game(..., .verbose = TRUE)
... |
Arguments passed on to configurations. Valid names may be:
|
.verbose |
(Logical) whether config messages should be printed. |
Named list of new configurations, invisibly.
# Show current config config_game()
# Show current config config_game()
run_game
is the main function to run word puzzle game.
The word puzzle game requires you to guess the word with single letters
in a limited times of trials. The letters you have guessed in the word
reveal themselves. If all letters are revealed before your guesses run out,
you win this round, otherwise you fail.
run_game(mask_char = "_", verbose = TRUE, ...)
run_game(mask_char = "_", verbose = TRUE, ...)
mask_char |
(String) letter to mask the letters not guessed in the word. |
verbose |
(Logical) whether to print welcome and score messages. |
... |
For internal use only. |
Named list of game stats invisibly, including:
Named integer with names as success
(success rounds)
and total
(total rounds).
Integer as the minimal number of guesses.
Named integer with names as hit
(guesses that hit
any letters in the word) and guess
(total guesses).
# Run word puzzle game if (interactive() == TRUE) { run_game() }
# Run word puzzle game if (interactive() == TRUE) { run_game() }