X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/a440f184767511bdda309d1c2e51719c1c2a7ca6..d3fc6146c0fd38562c28eac50bc932b2992b97a5:/fifteen.c diff --git a/fifteen.c b/fifteen.c index c4b0add..e74d10a 100644 --- a/fifteen.c +++ b/fifteen.c @@ -57,6 +57,11 @@ static game_params *default_params(void) static int game_fetch_preset(int i, char **name, game_params **params) { + if (i == 0) { + *params = default_params(); + *name = dupstr("4x4"); + return TRUE; + } return FALSE; } @@ -378,6 +383,11 @@ static char *solve_game(game_state *state, game_state *currstate, return dupstr("S"); } +static int game_can_format_as_text_now(game_params *params) +{ + return TRUE; +} + static char *game_text_format(game_state *state) { char *ret, *p, buf[80]; @@ -838,7 +848,7 @@ static void game_print(drawing *dr, game_state *state, int tilesize) #endif const struct game thegame = { - "Fifteen", "games.fifteen", + "Fifteen", "games.fifteen", "fifteen", default_params, game_fetch_preset, decode_params, @@ -853,7 +863,7 @@ const struct game thegame = { dup_game, free_game, TRUE, solve_game, - TRUE, game_text_format, + TRUE, game_can_format_as_text_now, game_text_format, new_ui, free_ui, encode_ui,