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.
create_game(
game_letters = NULL,
central = NULL,
num_letters = 7,
min_word_length = 4,
dictionary = "normal",
obscenities = FALSE
)
User-selected letters to use in the game (optional). Will
result in a warning if more letters are chosen than num_letters
. If
including, this should be a character string, e.g., "stb".
The central (that is, required) letter (optional). If not
provided, will be randomly chosen from among the game_letters
.
The number of letters for the game; defaults to 7, and should be between 6 and 10.
Expected length of words. Defaults to 4 letters, but can be between 2 and 6.
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.
Logical. Should obscenities be included? Defaults to FALSE.
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.
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.
play_game
to play the game
create_game()
create_game(num_letters = 6, game_letters = "s")
create_game(obscenities = TRUE)