~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make peg removal accessible from the keyboard.
[sgt/puzzles]
/
mines.c
diff --git
a/mines.c
b/mines.c
index
f9f714b
..
612ade5
100644
(file)
--- a/
mines.c
+++ b/
mines.c
@@
-1946,7
+1946,7
@@
static char *new_mine_layout(int w, int h, int n, int x, int y, int unique,
}
static char *new_game_desc(game_params *params, random_state *rs,
}
static char *new_game_desc(game_params *params, random_state *rs,
-
game_aux_info
**aux, int interactive)
+
char
**aux, int interactive)
{
/*
* We generate the coordinates of an initial click even if they
{
/*
* We generate the coordinates of an initial click even if they
@@
-1984,11
+1984,6
@@
static char *new_game_desc(game_params *params, random_state *rs,
}
}
}
}
-static void game_free_aux_info(game_aux_info *aux)
-{
- assert(!"Shouldn't happen");
-}
-
static char *validate_desc(game_params *params, char *desc)
{
int wh = params->w * params->h;
static char *validate_desc(game_params *params, char *desc)
{
int wh = params->w * params->h;
@@
-2298,7
+2293,7
@@
static void free_game(game_state *state)
}
static char *solve_game(game_state *state, game_state *currstate,
}
static char *solve_game(game_state *state, game_state *currstate,
-
game_aux_info
*aux, char **error)
+
char
*aux, char **error)
{
if (!state->layout->mines) {
*error = "Game has not been started yet";
{
if (!state->layout->mines) {
*error = "Game has not been started yet";
@@
-2357,7
+2352,7
@@
static void free_ui(game_ui *ui)
sfree(ui);
}
sfree(ui);
}
-char *encode_ui(game_ui *ui)
+
static
char *encode_ui(game_ui *ui)
{
char buf[80];
/*
{
char buf[80];
/*
@@
-2367,7
+2362,7
@@
char *encode_ui(game_ui *ui)
return dupstr(buf);
}
return dupstr(buf);
}
-void decode_ui(game_ui *ui, char *encoding)
+
static
void decode_ui(game_ui *ui, char *encoding)
{
sscanf(encoding, "D%d", &ui->deaths);
}
{
sscanf(encoding, "D%d", &ui->deaths);
}
@@
-3045,7
+3040,6
@@
const struct game thegame = {
TRUE, game_configure, custom_params,
validate_params,
new_game_desc,
TRUE, game_configure, custom_params,
validate_params,
new_game_desc,
- game_free_aux_info,
validate_desc,
new_game,
dup_game,
validate_desc,
new_game,
dup_game,