is_guess_correct: Establish if guess is correct and set game state accordingly

View source: R/wordler.R

is_guess_correctR Documentation

Establish if guess is correct and set game state accordingly

Description

Compares the guess in game$guess (index from game$guess_count) with the corresponding target word in game$target. If the guess is equal to the target, game$game_won and game$game_over are both set to TRUE.

Usage

is_guess_correct(game)

Arguments

game

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

Value

A 'wordler' game object.


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