{
if (params->width <= 1 || params->height <= 1)
return "Width and height must both be greater than one";
{
if (params->width <= 1 || params->height <= 1)
return "Width and height must both be greater than one";
char **aux, int interactive)
{
tree234 *possibilities, *barriertree;
char **aux, int interactive)
{
tree234 *possibilities, *barriertree;
-static char *solve_game(game_state *state, game_state *currstate,
- char *aux, char **error)
+static char *solve_game(const game_state *state, const game_state *currstate,
+ const char *aux, char **error)
* squares in the moving_row and moving_col are always inactive - this
* is so that "current" doesn't appear to jump across moving lines.
*/
* squares in the moving_row and moving_col are always inactive - this
* is so that "current" doesn't appear to jump across moving lines.
*/
slide_col_int(state->width, state->height, state->tiles, dir, col);
}
slide_col_int(state->width, state->height, state->tiles, dir, col);
}
-static void game_changed_state(game_ui *ui, game_state *oldstate,
- game_state *newstate)
+static void game_changed_state(game_ui *ui, const game_state *oldstate,
+ const game_state *newstate)
-static char *interpret_move(game_state *state, game_ui *ui,
- game_drawstate *ds, int x, int y, int button)
+static char *interpret_move(const game_state *state, game_ui *ui,
+ const game_drawstate *ds,
+ int x, int y, int button)
{
/* Ick: fake up `ds->tilesize' for macro expansion purposes */
struct { int tilesize; } ads, *ds = &ads;
{
/* Ick: fake up `ds->tilesize' for macro expansion purposes */
struct { int tilesize; } ads, *ds = &ads;
-static void draw_tile(drawing *dr, game_drawstate *ds, game_state *state,
+static void draw_tile(drawing *dr, game_drawstate *ds, const game_state *state,
int x, int y, int tile, float xshift, float yshift)
{
int bx = BORDER + WINDOW_OFFSET + TILE_SIZE * x + (int)(xshift * TILE_SIZE);
int x, int y, int tile, float xshift, float yshift)
{
int bx = BORDER + WINDOW_OFFSET + TILE_SIZE * x + (int)(xshift * TILE_SIZE);
-static void game_redraw(drawing *dr, game_drawstate *ds, game_state *oldstate,
- game_state *state, int dir, game_ui *ui, float t, float ft)
+static void game_redraw(drawing *dr, game_drawstate *ds,
+ const game_state *oldstate, const game_state *state,
+ int dir, const game_ui *ui,
+ float t, float ft)
if (oldstate && (t < ANIM_TIME)) {
/*
* We're animating a slide, of row/column number
if (oldstate && (t < ANIM_TIME)) {
/*
* We're animating a slide, of row/column number
-static float game_anim_length(game_state *oldstate,
- game_state *newstate, int dir, game_ui *ui)
+static float game_anim_length(const game_state *oldstate,
+ const game_state *newstate, int dir, game_ui *ui)
-static float game_flash_length(game_state *oldstate,
- game_state *newstate, int dir, game_ui *ui)
+static float game_flash_length(const game_state *oldstate,
+ const game_state *newstate, int dir, game_ui *ui)
const struct game thegame = {
"Netslide", "games.netslide", "netslide",
default_params,
const struct game thegame = {
"Netslide", "games.netslide", "netslide",
default_params,
FALSE, FALSE, game_print_size, game_print,
TRUE, /* wants_statusbar */
FALSE, game_timing_state,
FALSE, FALSE, game_print_size, game_print,
TRUE, /* wants_statusbar */
FALSE, game_timing_state,