~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace my brute-force algorithm in face_text_pos with a more complex
[sgt/puzzles]
/
magnets.c
diff --git
a/magnets.c
b/magnets.c
index
57bf37a
..
1df2caf
100644
(file)
--- a/
magnets.c
+++ b/
magnets.c
@@
-2235,6
+2235,11
@@
static float game_flash_length(game_state *oldstate, game_state *newstate,
return 0.0F;
}
return 0.0F;
}
+static int game_is_solved(game_state *state)
+{
+ return state->completed;
+}
+
static int game_timing_state(game_state *state, game_ui *ui)
{
return TRUE;
static int game_timing_state(game_state *state, game_ui *ui)
{
return TRUE;
@@
-2374,6
+2379,7
@@
const struct game thegame = {
game_redraw,
game_anim_length,
game_flash_length,
game_redraw,
game_anim_length,
game_flash_length,
+ game_is_solved,
TRUE, FALSE, game_print_size, game_print,
FALSE, /* wants_statusbar */
FALSE, game_timing_state,
TRUE, FALSE, game_print_size, game_print,
FALSE, /* wants_statusbar */
FALSE, game_timing_state,
@@
-2552,7
+2558,6
@@
int main(int argc, const char *argv[])
err = validate_desc(p, desc);
if (err) {
fprintf(stderr, "%s: %s\nDescription: %s\n", quis, err, desc);
err = validate_desc(p, desc);
if (err) {
fprintf(stderr, "%s: %s\nDescription: %s\n", quis, err, desc);
- free_params(p);
goto done;
}
s = new_game(NULL, p, desc);
goto done;
}
s = new_game(NULL, p, desc);