diff options
| author | Simon Tatham <anakin@pobox.com> | 2005-09-06 22:28:04 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2005-09-06 22:28:04 +0000 |
| commit | f8d1183c7a385d6c81479a5ed4a61cbf6e77e2e8 (patch) | |
| tree | 7cfa274dafd9a74221db121fdc25f8210e271707 | |
| parent | aec9667f00937fcbc110cc6f9a370499e864a6e9 (diff) | |
| download | puzzles-f8d1183c7a385d6c81479a5ed4a61cbf6e77e2e8.zip puzzles-f8d1183c7a385d6c81479a5ed4a61cbf6e77e2e8.tar.gz puzzles-f8d1183c7a385d6c81479a5ed4a61cbf6e77e2e8.tar.bz2 puzzles-f8d1183c7a385d6c81479a5ed4a61cbf6e77e2e8.tar.xz | |
I arranged that dying after the game was already completed didn't
increment the deaths counter. In doing so, I incorrectly handled the
borderline case, so that a death incurred _in the act_ of collecting
the final gem also didn't increment the deaths counter. Now it does.
[originally from svn r6277]
| -rw-r--r-- | inertia.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -710,11 +710,11 @@ static void game_changed_state(game_ui *ui, game_state *oldstate, /* * Increment the deaths counter. We only do this if * ui->just_made_move is set (redoing a suicide move doesn't - * kill you _again_), and also we only do it if the game isn't - * completed (once you're finished, you can play). + * kill you _again_), and also we only do it if the game wasn't + * already completed (once you're finished, you can play). */ if (!oldstate->dead && newstate->dead && ui->just_made_move && - newstate->gems) { + oldstate->gems) { ui->deaths++; ui->just_died = TRUE; } else { |