aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2022-12-07 00:17:08 +0000
committerBen Harris <bjh21@bjh21.me.uk>2022-12-07 00:38:23 +0000
commit14b434cb88d192a4a5cb2306115dec28cc69e714 (patch)
treeb6349a76789ab27c43bbe307069cc55be83bfd09
parenta8df0189ff9f49db04f9a33ae61bfcd1c1486c80 (diff)
downloadpuzzles-14b434cb88d192a4a5cb2306115dec28cc69e714.zip
puzzles-14b434cb88d192a4a5cb2306115dec28cc69e714.tar.gz
puzzles-14b434cb88d192a4a5cb2306115dec28cc69e714.tar.bz2
puzzles-14b434cb88d192a4a5cb2306115dec28cc69e714.tar.xz
guess: Move the cursor to the first peg position after a guess
It's annoying having to move it to the left each time. I suppose I could enter the second guess in reverse order, but then I'd need to move the cursor all the way to the right to submit it, which is just as bad.
-rw-r--r--guess.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/guess.c b/guess.c
index ba04a9e..793c815 100644
--- a/guess.c
+++ b/guess.c
@@ -507,7 +507,7 @@ static void game_changed_state(game_ui *ui, const game_state *oldstate,
ui->markable = is_markable(&newstate->params, ui->curr_pegs);
/* Clean up cursor position */
if (!ui->markable && ui->peg_cur == newstate->solution->npegs)
- ui->peg_cur--;
+ ui->peg_cur = 0;
}
#define PEGSZ (ds->pegsz)