int ret, x1 = state->w+1, y1 = state->h+1;
if (x > 0 && x < x1 && y > 0 && y < y1) return 0; /* in arena */
int ret, x1 = state->w+1, y1 = state->h+1;
if (x > 0 && x < x1 && y > 0 && y < y1) return 0; /* in arena */
debug(("isball, new (%d, %d)\n", gx, gy));
/* if we're off the grid (into the firing range) there's never a ball. */
debug(("isball, new (%d, %d)\n", gx, gy));
/* if we're off the grid (into the firing range) there's never a ball. */
draw_rect_outline(dr, dx, dy, TILE_SIZE, TILE_SIZE, COL_GRID);
if (gs_tile &~ (LASER_WRONG | LASER_OMITTED | FLAG_CURSOR)) {
draw_rect_outline(dr, dx, dy, TILE_SIZE, TILE_SIZE, COL_GRID);
if (gs_tile &~ (LASER_WRONG | LASER_OMITTED | FLAG_CURSOR)) {
+static int game_status(game_state *state)
+{
+ if (state->reveal) {
+ /*
+ * We return nonzero whenever the solution has been revealed,
+ * even (on spoiler grounds) if it wasn't guessed correctly.
+ */
+ if (state->nwrong == 0 &&
+ state->nmissed == 0 &&
+ state->nright >= state->minballs)
+ return +1;
+ else
+ return -1;
+ }
+ return 0;
+}
+
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,