aboutsummaryrefslogtreecommitdiff
path: root/midend.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2005-06-17 18:54:58 +0000
committerSimon Tatham <anakin@pobox.com>2005-06-17 18:54:58 +0000
commitf01f82105e5feb2586a2ca257947d76e9b982d04 (patch)
treef1a99cc46e8a333c750616969d740dd540f0f44b /midend.c
parent32111ef901daba8b9168736f9a52bec8f6e95c98 (diff)
downloadpuzzles-f01f82105e5feb2586a2ca257947d76e9b982d04.zip
puzzles-f01f82105e5feb2586a2ca257947d76e9b982d04.tar.gz
puzzles-f01f82105e5feb2586a2ca257947d76e9b982d04.tar.bz2
puzzles-f01f82105e5feb2586a2ca257947d76e9b982d04.tar.xz
Infrastructure change which I've been thinking about for a while:
the back end function solve_game() now takes the _current_ game_state in addition to the initial one. [originally from svn r5969]
Diffstat (limited to 'midend.c')
-rw-r--r--midend.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/midend.c b/midend.c
index f4eeb61..dec0cc9 100644
--- a/midend.c
+++ b/midend.c
@@ -947,7 +947,9 @@ char *midend_solve(midend_data *me)
return "No game set up to solve"; /* _shouldn't_ happen! */
msg = "Solve operation failed"; /* game _should_ overwrite on error */
- s = me->ourgame->solve(me->states[0].state, me->aux_info, &msg);
+ s = me->ourgame->solve(me->states[0].state,
+ me->states[me->statepos-1].state,
+ me->aux_info, &msg);
if (!s)
return msg;