struct game_state {
int width, height, cx, cy, wrapping, completed;
- int used_solve, just_used_solve;
+ int used_solve;
int move_count, movetarget;
/* position (row or col number, starting at 0) of last move. */
state->wrapping = params->wrapping;
state->movetarget = params->movetarget;
state->completed = 0;
- state->used_solve = state->just_used_solve = FALSE;
+ state->used_solve = FALSE;
state->move_count = 0;
state->last_move_row = -1;
state->last_move_col = -1;
ret->movetarget = state->movetarget;
ret->completed = state->completed;
ret->used_solve = state->used_solve;
- ret->just_used_solve = state->just_used_solve;
ret->move_count = state->move_count;
ret->last_move_row = state->last_move_row;
ret->last_move_col = state->last_move_col;
return dupstr(aux);
}
+static int game_can_format_as_text_now(game_params *params)
+{
+ return TRUE;
+}
+
static char *game_text_format(game_state *state)
{
return NULL;
strlen(move) == from->width * from->height + 1) {
int i;
ret = dup_game(from);
- ret->used_solve = ret->just_used_solve = TRUE;
+ ret->used_solve = TRUE;
ret->completed = ret->move_count = 1;
for (i = 0; i < from->width * from->height; i++) {
return NULL; /* can't parse move string */
ret = dup_game(from);
- ret->just_used_solve = FALSE;
if (col)
slide_col(ret, d, c);
static float game_anim_length(game_state *oldstate,
game_state *newstate, int dir, game_ui *ui)
{
- /*
- * Don't animate an auto-solve move.
- */
- if ((dir > 0 && newstate->just_used_solve) ||
- (dir < 0 && oldstate->just_used_solve))
- return 0.0F;
-
return ANIM_TIME;
}
#endif
const struct game thegame = {
- "Netslide", "games.netslide",
+ "Netslide", "games.netslide", "netslide",
default_params,
game_fetch_preset,
decode_params,
dup_game,
free_game,
TRUE, solve_game,
- FALSE, game_text_format,
+ FALSE, game_can_format_as_text_now, game_text_format,
new_ui,
free_ui,
encode_ui,