In other words, a Yellow result doesn't just mean that letter occurs somewhere. A Black also doesn't mean the letter occurs nowhere.
In other words, a Yellow result doesn't just mean that letter occurs somewhere. A Black also doesn't mean the letter occurs nowhere.
When building a new word grid game, would you take Wordfeud's rules over Scravble's? I don't think I would.
( My revolt Wordle server: https://app.revolt.chat/invite/2q3NYtM9 )
remaining="" output=""
for ((i = 0; i < ${#actual}; i++)); do
if [[ "${actual:$i:1}" != "${guess:$i:1}" ]]; then
remaining+=${actual:$i:1}
fi
done
for ((i = 0; i < ${#actual}; i++)); do
if [[ "${actual:$i:1}" != "${guess:$i:1}" ]]; then
if [[ "$remaining" == *"${guess:$i:1}"* ]]; then
output+="\033[30;103m ${guess:$i:1} \033[0m"
remaining=${remaining/"${guess:$i:1}"/}
else
output+="\033[30;107m ${guess:$i:1} \033[0m"
fi
else
output+="\033[30;102m ${guess:$i:1} \033[0m"
fi
done
printf "$output\n"
Explanation:The variable `remaining` tracks the letters of `actual` that can contribute toward yellows.
You can see this with today's word by guessing MOTTO. The leftmost T will be yellow and the rightmost will be black.
Similarly, if you guess TENET the initial T is black but the final T is green.
Today's word is ZBVFG (rot13).
Then the problem at least would have been isolated to that part and the rest of the system in 100% good shape.