have_a_guess: Submit a guess word to a wordler game object

Description Usage Arguments Value

View source: R/wordler.R

Description

If x is a valid guess, it is added to game$guess and assessed against the target word. Increments game$guess_count if a valid guess is made.

Usage

1
have_a_guess(x, game, allowed_words = NULL)

Arguments

x

the guess.

game

'wordler' game object (as generated by new_wordler).

allowed_words

a character vector of valid words for the guess. x must be in this vector to be allowed. Defaults to words used by the WORDLE game online (?wordler::wordle_allowed) if not provided.

Value

A 'wordler' game object.


wordler documentation built on Feb. 1, 2022, 5:08 p.m.