WordleGame: Wordle Game Engine

Description Public fields Methods

Description

Wordle Game Engine

Wordle Game Engine

Public fields

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

Methods

Public methods


Method new()

Usage
WordleGame$new(words, dark_mode = TRUE, debug = FALSE, target_word = NULL)
Arguments
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


Method try()

Usage
WordleGame$try(word, quiet = FALSE)
Arguments
word

string

quiet

suppress output? default: FALSE


Method is_solved()

is the game solved?

Usage
WordleGame$is_solved()

Method share()

Print a shareable text block showing the attempts

Usage
WordleGame$share()

Method clone()

The objects of this class are cloneable with this method.

Usage
WordleGame$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


ylmazkanat/world.github.io documentation built on Jan. 24, 2022, 12:07 a.m.