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",
"program": "${workspaceFolder}/build/game_solve",
"args": [
"-s gdefault.txt",
"gdefault.txt",
"gdefaultsol.txt"
"-s",
"${workspaceFolder}/build/gdefault.txt",
"${workspaceFolder}/build/gdefaultsol.txt"
],
"stopAtEntry": false,
"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) {
game_set_square(g, i, j, S_LIGHTBULB);
game_update_flags(g);
if (game_has_error_general(g)) {
game_set_square(g, i, j, S_BLANK);
return false;
}
if (!game_has_error_general(g)) {
if (game_is_over(g))
return true;
if (deep > 1) {
@@ -128,6 +125,7 @@ bool aux_game_solve(game g, uint deep) {
return true;
}
}
}
game_set_square(g, i, j, S_BLANK);
}
}