+static float game_anim_length_real(const game_state *oldstate,
+ const game_state *newstate, int dir,
+ const game_ui *ui)
+{
+ /*
+ * Our game_anim_length doesn't need to modify its game_ui, so
+ * this is the real function which declares ui as const. We must
+ * wrap this for the backend structure with a version that has ui
+ * non-const, but we still need this version to call from within
+ * game_redraw which only has a const ui available.
+ */
+ return (float)(ANIM_PER_BLKSIZE_UNIT * sqrt(newstate->n-1));
+}
+
+static float game_anim_length(const game_state *oldstate,
+ const game_state *newstate, int dir, game_ui *ui)