mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Unequal: run check_complete() after a hint move.
A user sent in the game id 7:0,0L,0,0,0L,0L,1,0U,0U,0D,0UD,0,0,7,0,0D,0,0D,0,0,0,0,0,0,0,0,0,0D,0,0,3,0,0U,0,0,0,0,2,6,0,0U,0,0,0,7,2,0,0U,5L, starting from which, one press of 'h' will fill in a 2 in the top left corner and possibilities 345 to its right; if you then fill in 5 there and press 'h' again, the hint system fills in the whole of an apparent solution which isn't the one a proper use of the Solve feature would give you - except that it's not actually a second solution, because one < clue on the top row is violated. Without this fix, that < failed to light up red, making the puzzle look ambiguous if you're not paying enough attention to spot it.
This commit is contained in:
@ -1566,7 +1566,9 @@ static game_state *execute_move(const game_state *state, const char *move)
|
|||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
} else if (move[0] == 'H') {
|
} else if (move[0] == 'H') {
|
||||||
return solver_hint(state, NULL, DIFF_EASY, DIFF_EASY);
|
ret = solver_hint(state, NULL, DIFF_EASY, DIFF_EASY);
|
||||||
|
check_complete(ret->nums, ret, 1);
|
||||||
|
return ret;
|
||||||
} else if (move[0] == 'F' && sscanf(move+1, "%d,%d,%d", &x, &y, &n) == 3 &&
|
} else if (move[0] == 'F' && sscanf(move+1, "%d,%d,%d", &x, &y, &n) == 3 &&
|
||||||
x >= 0 && x < state->order && y >= 0 && y < state->order) {
|
x >= 0 && x < state->order && y >= 0 && y < state->order) {
|
||||||
ret = dup_game(state);
|
ret = dup_game(state);
|
||||||
|
Reference in New Issue
Block a user