X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=flood.c;h=1262be8175cbb4ac17de13d0110f3b8753965781;hb=db313b3948d27244dd7c34c2609c66d6204d8931;hp=bbba91528bdee8f82e9993f122fa80deb7a72bf7;hpb=195217a48062c3ee64a47b1d0b5327e5838a105c;p=sgt-puzzles.git diff --git a/flood.c b/flood.c index bbba915..1262be8 100644 --- a/flood.c +++ b/flood.c @@ -697,8 +697,10 @@ static char *solve_game(const game_state *state, const game_state *currstate, char buf[256]; struct solver_scratch *scratch; - if (currstate->complete) + if (currstate->complete) { + *error = "Puzzle is already solved"; return NULL; + } /* * Find the best solution our solver can give. @@ -1334,7 +1336,7 @@ static void game_print(drawing *dr, const game_state *state, int tilesize) const struct game thegame = { "Flood", "games.flood", "flood", default_params, - game_fetch_preset, + game_fetch_preset, NULL, decode_params, encode_params, free_params,