From f29d81e932c45488212a9645fae387fa4e674f81 Mon Sep 17 00:00:00 2001 From: adam Date: Tue, 29 Sep 2026 17:19:24 +0000 Subject: [PATCH] keep hard mode hints when resuming a game 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 --- wordle | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wordle b/wordle index f11ac31..b6a0574 100755 --- a/wordle +++ b/wordle @@ -409,6 +409,15 @@ function save_game() { echo "KEYS[$key]='${KEYS[$key]}'" >> "${PROGRESS_FILE}" done + # Previous row's hints, needed by hard_mode_check after a resume + for key in "${!greens[@]}"; do + echo "greens[$key]='${greens[$key]}'" >> "${PROGRESS_FILE}" + done + + for key in "${!yellows[@]}"; do + echo "yellows[$key]='${yellows[$key]}'" >> "${PROGRESS_FILE}" + done + { echo "ROW=${row}" echo "POOL=${POOL}"