Description Usage Arguments Value See Also Examples
play_game
provides an interactive interface for guessing words
based on a game made by create_game
. If you call this function
directly, it will create the game itself. Assigning the results to a variable
will allow you to pause and continue the game later by running
play_game(prev_game)
.
1 2 3 4 5 6 7 8 9 10 11 |
game |
A game object created by |
keep_central_first |
Logical. Should the game always display the "central" letter first when printing the letters. Defaults to FALSE. |
restart |
Logical. Only useful when trying anew with an existing game. Deletes previous guesses and starts with a clean slate, while using the same letters (and therefore words). The remaining arguments are passed to the |
game_letters |
User-selected letters to use in the game. Will
result in a warning if more letters are chosen than |
central |
The central (that is, required) letter. 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. |
Regardless of whether you include any inputs, the code will run a
version of the game. If passed a game object from create_game
,
the game will use the same letters and words. If passed a previously-played
game from play_game
, the game will pick up where you left off, and
remind you of past guesses. Assign play_game
to a variable to keep
playing later.
create_game
to set up a game without playing.
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.