fixed only first letter being displayed on a win where it was wrong before

This commit is contained in:
adam committed 2025-01-29 01:48:38 +00:00
1 parent f37c483518
commit 9378e5e585
1 file changed
+3 -3
+3 -3
View File
@@ -179,7 +179,7 @@ function validate_guess() {
}
function hard_mode_check() {
#[[ -z "${row}" || "${row}" == 0 ]] && return 0
[[ -z "${row}" || "${row}" == 0 ]] && return 0
declare GUESS=$1
@@ -235,8 +235,6 @@ function check_guess() {
continue
fi
[[ "${#greens[*]}" -eq 5 ]] && return 5
if [[ "${chars}" == *${_char}* ]]; then
chars="${chars/${_char}/}"
yellows[c]="${_char}"
@@ -247,6 +245,8 @@ function check_guess() {
[[ " ${greens[*]} " =~ ${_char} ]] && continue
POOL="${POOL/${_char}/_}"
done
[[ "${#greens[*]}" == 5 ]] && return 5
}
function reveal_row() {