WIP
This commit is contained in:
1 parent
d87397a3e3
commit
b7b1cef0d9
2 files changed
+9
-11
No files matched your search
+6
-8
@@ -117,15 +117,13 @@ 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_is_over(g))
|
||||
return true;
|
||||
if (deep > 1) {
|
||||
if (aux_game_solve(g, deep - 1)) {
|
||||
if (!game_has_error_general(g)) {
|
||||
if (game_is_over(g))
|
||||
return true;
|
||||
if (deep > 1) {
|
||||
if (aux_game_solve(g, deep - 1)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
game_set_square(g, i, j, S_BLANK);
|
||||
|
||||
Reference in new issue
Block a user