~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
We were forgetting to count the final move.
[sgt/puzzles]
/
cube.c
diff --git
a/cube.c
b/cube.c
index
5940c8b
..
9cb359e
100644
(file)
--- a/
cube.c
+++ b/
cube.c
@@
-559,7
+559,7
@@
char *new_game_seed(game_params *params)
/*
* Choose a non-blue square for the polyhedron.
*/
/*
* Choose a non-blue square for the polyhedron.
*/
- sprintf(p, ":%d",
rand_upto(m)
);
+ sprintf(p, ":%d",
data.gridptrs[0][rand_upto(m)]
);
sfree(data.gridptrs[0]);
sfree(flags);
sfree(data.gridptrs[0]);
sfree(flags);
@@
-1046,6
+1046,8
@@
game_state *make_move(game_state *from, int x, int y, int button)
ret->facecolours = newcolours;
}
ret->facecolours = newcolours;
}
+ ret->movecount++;
+
/*
* And finally, swap the colour between the bottom face of the
* polyhedron and the face we've just landed on.
/*
* And finally, swap the colour between the bottom face of the
* polyhedron and the face we've just landed on.
@@
-1097,7
+1099,6
@@
game_state *make_move(game_state *from, int x, int y, int button)
ret->sgkey[1] = skey[1];
ret->previous = from->current;
ret->angle = angle;
ret->sgkey[1] = skey[1];
ret->previous = from->current;
ret->angle = angle;
- ret->movecount++;
return ret;
}
return ret;
}