This commit is contained in:
Théophyl Hoguet committed 2022-03-05 22:20:37 +01:00
1 parent d9627ab957
commit 7961a69d18
2 files changed
+5 -7

No files matched your search

+3 -3
View File
@@ -34,9 +34,9 @@
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/build/game_solve", "program": "${workspaceFolder}/build/game_solve",
"args": [ "args": [
"-s gdefault.txt", "-s",
"gdefault.txt", "${workspaceFolder}/build/gdefault.txt",
"gdefaultsol.txt" "${workspaceFolder}/build/gdefaultsol.txt"
], ],
"stopAtEntry": false, "stopAtEntry": false,
"cwd": "${fileDirname}", "cwd": "${fileDirname}",
+2 -4
View File
@@ -117,10 +117,7 @@ bool aux_game_solve(game g, uint deep) {
if (game_get_state(g, i, j) == S_BLANK) { if (game_get_state(g, i, j) == S_BLANK) {
game_set_square(g, i, j, S_LIGHTBULB); game_set_square(g, i, j, S_LIGHTBULB);
game_update_flags(g); game_update_flags(g);
if (game_has_error_general(g)) { if (!game_has_error_general(g)) {
game_set_square(g, i, j, S_BLANK);
return false;
}
if (game_is_over(g)) if (game_is_over(g))
return true; return true;
if (deep > 1) { if (deep > 1) {
@@ -128,6 +125,7 @@ bool aux_game_solve(game g, uint deep) {
return true; return true;
} }
} }
}
game_set_square(g, i, j, S_BLANK); game_set_square(g, i, j, S_BLANK);
} }
} }