Description Public fields Methods
Wordle Game Engine
Wordle Game Engine
words
character vector of words
target_word
target word chosen random during initialisation
target
character vector of letters in target word
attempts
vector of attempted words
responses
list of responses for each attempte
nchar
number of characters in all words
dark_mode
logical. Initialise a WordleGame object
new()
WordleGame$new(words, dark_mode = TRUE, debug = FALSE, target_word = NULL)
words
character vector of candidate words
dark_mode
if using darkmode, set to TRUE
debug
logical. default FALSE
target_word
specify the target word instead of choosing randomly. Useful for debugging. Play a word and see what the response is
try()
WordleGame$try(word, quiet = FALSE)
word
string
quiet
suppress output? default: FALSE
is_solved()
is the game solved?
WordleGame$is_solved()
share()
Print a shareable text block showing the attempts
WordleGame$share()
clone()
The objects of this class are cloneable with this method.
WordleGame$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.