mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Added an automatic `Solve' feature to most games. This is useful for
various things: - if you haven't fully understood what a game is about, it gives you an immediate example of a puzzle plus its solution so you can understand it - in some games it's useful to compare your solution with the real one and see where you made a mistake - in the rearrangement games (Fifteen, Sixteen, Twiddle) it's handy to be able to get your hands on a pristine grid quickly so you can practise or experiment with manoeuvres on it - it provides a good way of debugging the games if you think you've encountered an unsolvable grid! [originally from svn r5731]
This commit is contained in:
7
cube.c
7
cube.c
@ -985,6 +985,12 @@ static void free_game(game_state *state)
|
||||
sfree(state);
|
||||
}
|
||||
|
||||
static game_state *solve_game(game_state *state, game_aux_info *aux,
|
||||
char **error)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static char *game_text_format(game_state *state)
|
||||
{
|
||||
return NULL;
|
||||
@ -1557,6 +1563,7 @@ const struct game thegame = {
|
||||
new_game,
|
||||
dup_game,
|
||||
free_game,
|
||||
FALSE, solve_game,
|
||||
NULL, game_text_format,
|
||||
new_ui,
|
||||
free_ui,
|
||||
|
Reference in New Issue
Block a user