assess_guess {wordler} | R Documentation |
Assess a guess against the target word
Description
Assesses the guess in list game$guess
(index from
game$guess_count
) against the target word in game$target
.
Usage
assess_guess(game)
Arguments
game |
'wordler' game object (as generated by
|
Details
Adds the assessment to the corresponding list item in game$assess
.
This assessment should be considered as how the guesses should be displayed
to the user and replicates the behaviour of the WORDLE game
(https://www.powerlanguage.co.uk/wordle/).
For each letter in each guess, one of the following assessments are made:
'not_in_word' - the letter is not present in the target word (or has already been flagged as 'in_word' earlier in the word).
'in_word' - the letter is in the target word. More specifically, the first instance of the letter in the guess present in the word. Subsequent instances are flagged as 'not_in_word'.
'in_position' - the letter is in the same position in the target word.
Value
'wordler' game object.