run_game | R Documentation |
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, ...)
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()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.