diff --git a/wordle b/wordle index ef792db..0941a76 100755 --- a/wordle +++ b/wordle @@ -318,9 +318,8 @@ function check_guess() { yellows[c]="${_char}" # volatile - stores previous row yellows YELLOWS[$_row,$c]="${_char}" # stores all yellow from all rounds BOARD[$_row,$c]="${YELLOW}${BOLD}${LETTER} ${_char} ${UNBOLD}" - else - POOL="${POOL/${_char}/_}" fi + [[ " ${yellows[*]} " =~ ${_char} ]] && continue [[ " ${greens[*]} " =~ ${_char} ]] && continue POOL="${POOL/${_char}/_}"