~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Lambros points out that trying to generate a 3x3 Cairo Easy grid
[sgt/puzzles]
/
net.c
diff --git
a/net.c
b/net.c
index
0d51443
..
1177f80
100644
(file)
--- a/
net.c
+++ b/
net.c
@@
-232,7
+232,7
@@
static void decode_params(game_params *ret, char const *string)
ret->wrapping = TRUE;
} else if (*p == 'b') {
p++;
ret->wrapping = TRUE;
} else if (*p == 'b') {
p++;
- ret->barrier_probability = atof(p);
+ ret->barrier_probability =
(float)
atof(p);
while (*p && (*p == '.' || isdigit((unsigned char)*p))) p++;
} else if (*p == 'a') {
p++;
while (*p && (*p == '.' || isdigit((unsigned char)*p))) p++;
} else if (*p == 'a') {
p++;
@@
-1782,6
+1782,11
@@
static char *solve_game(game_state *state, game_state *currstate,
return ret;
}
return ret;
}
+static int game_can_format_as_text_now(game_params *params)
+{
+ return TRUE;
+}
+
static char *game_text_format(game_state *state)
{
return NULL;
static char *game_text_format(game_state *state)
{
return NULL;
@@
-2858,8
+2863,8
@@
static void game_print_size(game_params *params, float *x, float *y)
* I'll use 8mm squares by default.
*/
game_compute_size(params, 800, &pw, &ph);
* I'll use 8mm squares by default.
*/
game_compute_size(params, 800, &pw, &ph);
- *x = pw / 100.0;
- *y = ph / 100.0;
+ *x = pw / 100.0
F
;
+ *y = ph / 100.0
F
;
}
static void draw_diagram(drawing *dr, game_drawstate *ds, int x, int y,
}
static void draw_diagram(drawing *dr, game_drawstate *ds, int x, int y,
@@
-3005,7
+3010,7
@@
const struct game thegame = {
dup_game,
free_game,
TRUE, solve_game,
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,
new_ui,
free_ui,
encode_ui,