Description Usage Arguments Details Value See Also Examples
create_game
defines the terms of the game, choosing letters that
contain a pangram (i.e., all of them are used together in at least one
English word). The function is called automatically by
play_game
, which then interactively plays the game. However,
you can intentionally use create_game
to save a set of words.
1 2 3 4 5 6 7 8 | create_game(
game_letters = NULL,
central = NULL,
num_letters = 7,
min_word_length = 4,
dictionary = "normal",
obscenities = FALSE
)
|
game_letters |
User-selected letters to use in the game (optional). Will
result in a warning if more letters are chosen than |
central |
The central (that is, required) letter (optional). If not
provided, will be randomly chosen from among the |
num_letters |
The number of letters for the game; defaults to 7, and should be between 6 and 10. |
min_word_length |
Expected length of words. Defaults to 4 letters, but can be between 2 and 6. |
dictionary |
Character string. Choice of how detailed of a dictionary to use. Can be any of "slim", "broad", or "normal". Defaults to "normal", which is recommended. |
obscenities |
Logical. Should obscenities be included? Defaults to FALSE. |
Because of random sampling, it is possible that the internal function will not find a set of letters with a pangram; if so, simply run the function again.
Regardless of whether you include any inputs, the function returns a
game object game
which can be used with play_game
. The
results of create_game
should be assigned and used in
play_game
; running it on its own will have no effect.
play_game
to play the game
1 2 3 | create_game()
create_game(num_letters = 6, game_letters = "s")
create_game(obscenities = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.