Title: | Word Puzzle Game |
Version: | 0.1.1 |
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. |
License: | MIT + file LICENSE |
Config/testthat/edition: | 3 |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.0 |
URL: | https://github.com/zhuxr11/wordPuzzleR |
BugReports: | https://github.com/zhuxr11/wordPuzzleR/issues |
Imports: | purrr (≥ 0.3.4), scales (≥ 1.1.1), stringr (≥ 1.4.0) |
Collate: | 'zzz.R' 'utils.R' 'main.R' 'wordPuzzleR-package.R' |
NeedsCompilation: | no |
Packaged: | 2024-02-25 04:09:40 UTC; Xiurui Zhu |
Author: | Xiurui Zhu [aut, cre], @olivory [ctb] (Add `URL` and `BugReports` fields to `DESCRIPTION`.) |
Maintainer: | Xiurui Zhu <zxr6@163.com> |
Repository: | CRAN |
Date/Publication: | 2024-02-25 04:20:02 UTC |
wordPuzzleR: 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.
Author(s)
Maintainer: Xiurui Zhu zxr6@163.com
Other contributors:
@olivory olivroy@fosstodon.org (Add 'URL' and 'BugReports' fields to 'DESCRIPTION'.) [contributor]
See Also
Useful links:
Examples
# Run word puzzle game
if (interactive() == TRUE) {
run_game()
}
Configure wordPuzzleR
Description
config_game
configures wordPuzzleR, or show current configuration
when used with no arguments.
Usage
config_game(..., .verbose = TRUE)
Arguments
... |
Arguments passed on to configurations. Valid names may be:
|
.verbose |
(Logical) whether config messages should be printed. |
Value
Named list of new configurations, invisibly.
Examples
# Show current config
config_game()
Run word puzzle game
Description
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.
Usage
run_game(mask_char = "_", verbose = TRUE, ...)
Arguments
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. |
Value
Named list of game stats invisibly, including:
- score
Named integer with names as
success
(success rounds) andtotal
(total rounds).- best_guess
Integer as the minimal number of guesses.
- best_hit
Named integer with names as
hit
(guesses that hit any letters in the word) andguess
(total guesses).
Examples
# Run word puzzle game
if (interactive() == TRUE) {
run_game()
}