Replace "GREEN Issue", "YELLOW Issue" and "POOL Issue" with messages
that say which letter broke which rule:
3rd letter must be A
Must contain R
1st letter can't be R (was yellow there before)
S is not in the word (strict mode, grey letter reused)
hard_mode_check now records the failing position, and a yellow letter
reused in the same spot gets its own code (6, previously the unused
"NEW Issue"). Drop the unused "Not A Valid Guess" code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a loss the answer line was written to RESULT_FILE with the border
indent and bold, but CUR_RESULT_FILE only got the letters. Move the
answer line into render_answer and use it for the terminal and both
files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At end of input (Ctrl-D, or stdin closed) read returns straight away
with an empty guess, so the "Must be 5 letters" loop spun forever at
full CPU. If the game's parent process was killed first, the subshell
was left orphaned and spinning.
Exit retrieve_guess when read hits EOF, pass that back through the
retry prompts with a single recursive call, and quit from main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
update_stats ran for every online game, so practice games played after
the daily counted towards played/wins/losses and a practice loss reset
the streak. Move it inside the DAILY_DONE check with the board files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An average of 3.04 was shown as 3.4 because the hundredths weren't
padded. Pad with parameter expansion to keep the script bash-only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hard_mode_check uses the previous row's greens and yellows, but these
weren't written to the progress file, so after resuming a game the next
guess could drop known green and yellow letters. Save them alongside
the rest of the game state.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Progress was only saved at the start of a game and on Ctrl-C, so a
dropped connection lost every guess made so far. Ctrl-C during the
reveal also saved the scored row without advancing ROW, which gave the
player that guess back on resume.
Save straight after each guess is scored (before the reveal) with the
next row, record the result before the final reveal, and make the
SIGINT trap only tidy up the terminal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Usernames are used in file names and URLs, so a '/' could write files
outside the game directory and a space broke the share links. Only
allow a-z, 0-9 and _ (max 32 chars) and re-prompt otherwise.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>