chiark
/
gitweb
/
~ian
/
sgt-puzzles.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Forbid undo of new-game if it would change the params.
[sgt-puzzles.git]
/
flood.c
diff --git
a/flood.c
b/flood.c
index bbba91528bdee8f82e9993f122fa80deb7a72bf7..1262be8175cbb4ac17de13d0110f3b8753965781 100644
(file)
--- 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;
char buf[256];
struct solver_scratch *scratch;
- if (currstate->complete)
+ if (currstate->complete) {
+ *error = "Puzzle is already solved";
return NULL;
return NULL;
+ }
/*
* Find the best solution our solver can give.
/*
* 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,
const struct game thegame = {
"Flood", "games.flood", "flood",
default_params,
- game_fetch_preset,
+ game_fetch_preset,
NULL,
decode_params,
encode_params,
free_params,
decode_params,
encode_params,
free_params,