diff options
| author | Jacob Nevins <jacobn@chiark.greenend.org.uk> | 2004-08-16 16:29:54 +0000 |
|---|---|---|
| committer | Jacob Nevins <jacobn@chiark.greenend.org.uk> | 2004-08-16 16:29:54 +0000 |
| commit | daac529a9eded98181fdf2b0d79e7138195614ec (patch) | |
| tree | 88f9422b8f36470c838e379340a2f9598e930229 /HACKING.but | |
| parent | f1e8a586b53535bad3e201a8cc42b514a8cb6e16 (diff) | |
| download | puzzles-daac529a9eded98181fdf2b0d79e7138195614ec.zip puzzles-daac529a9eded98181fdf2b0d79e7138195614ec.tar.gz puzzles-daac529a9eded98181fdf2b0d79e7138195614ec.tar.bz2 puzzles-daac529a9eded98181fdf2b0d79e7138195614ec.tar.xz | |
After discussion with Simon, the game redraw functions are now passed a new
argument `dir' which tells them whether this redraw is due to an undo, rather
than have them second-guess it from game state.
Note that none of the actual games yet take advantage of this; so it hasn't
been tested in anger (although it has been inspected by debugging).
[originally from svn r4469]
Diffstat (limited to 'HACKING.but')
| -rw-r--r-- | HACKING.but | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/HACKING.but b/HACKING.but index f6c93f0..e1abf75 100644 --- a/HACKING.but +++ b/HACKING.but @@ -166,7 +166,8 @@ chronological order, the second one contains the direction field which corresponds to the actual difference between the states. However, when it is passed a pair of states in the opposite order due to an undo, it should be looking in the \e{first} one to find -the direction field. Sixteen solves this by also storing the current -move count in the game state, so that \cw{game_redraw()} can compare -the two move counts to work out whether it's drawing an undo or not, -and look in the right place for the direction field. +the direction field. + +For this reason, in the redraw functions you are provided with an +extra argument \c{dir} which tells you which state was chronologically +first; \c{dir} is +1 for a normal move and -1 for an undo. |