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 <noreply@anthropic.com>
This commit is contained in:
1 parent
73f403693a
commit
f29d81e932
1 file changed
+9
@@ -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}"
|
||||
|
||||
Reference in new issue
Block a user