chiark / gitweb /
Ahem. The `Solve' option in orientable Twiddle needs to correct the
authorSimon Tatham <anakin@pobox.com>
Mon, 2 May 2005 13:22:25 +0000 (13:22 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 2 May 2005 13:22:25 +0000 (13:22 +0000)
orientations as well as the order!

[originally from svn r5733]

twiddle.c

index 8a389b4512bae2bf98f278c372d1f9495d01aa55..d67dc40e37e021d258959c421e8729f127dd0dcf 100644 (file)
--- a/twiddle.c
+++ b/twiddle.c
@@ -479,6 +479,7 @@ static game_state *solve_game(game_state *state, game_aux_info *aux,
                              char **error)
 {
     game_state *ret = dup_game(state);
+    int i;
 
     /*
      * Simply replace the grid with a solved one. For this game,
@@ -488,6 +489,8 @@ static game_state *solve_game(game_state *state, game_aux_info *aux,
      * which to practise manoeuvres.
      */
     qsort(ret->grid, ret->w*ret->h, sizeof(int), compare_int);
+    for (i = 0; i < ret->w*ret->h; i++)
+       ret->grid[i] &= ~3;
     ret->used_solve = ret->just_used_solve = TRUE;
     ret->completed = ret->movecount;