have_a_guess: Submit a guess word to a wordler game object

View source: R/wordler.R

have_a_guessR Documentation

Submit a guess word to a wordler game object

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

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.


DavidASmith/wordler documentation built on April 2, 2022, 6:40 p.m.