{
int ls = state->order * state->order * 5;
int maxposs = 0, minclues = 5, best = -1, i, j;
- int nposs, nclues, loc, x, y;
+ int nposs, nclues, loc;
#ifdef STANDALONE_SOLVER
if (solver_show_working) {
if (!gg_place_clue(state, scratch[i], latin, 1)) continue;
loc = scratch[i] / 5;
- x = loc % state->order; y = loc / state->order;
for (j = nposs = 0; j < state->order; j++) {
if (state->hints[loc*state->order + j]) nposs++;
}
(nposs == maxposs && nclues < minclues)) {
best = i; maxposs = nposs; minclues = nclues;
#ifdef STANDALONE_SOLVER
- if (solver_show_working)
+ if (solver_show_working) {
+ int x = loc % state->order, y = loc / state->order;
printf("gg_best_clue: b%d (%d,%d) new best [%d poss, %d clues].\n",
best, x+1, y+1, nposs, nclues);
+ }
#endif
}
}
/* Draw all the greater-than signs emanating from this tile. */
if (f & F_ADJ_UP) {
+ draw_rect(dr, ox, oy - g, TILE_SIZE, g, COL_BACKGROUND);
draw_gt(dr, ox+g2, oy-g4, g2, -g2, g2, g2,
(f & F_ERROR_UP) ? COL_ERROR : col);
draw_update(dr, ox, oy-g, TILE_SIZE, g);
}
if (f & F_ADJ_RIGHT) {
+ draw_rect(dr, ox + TILE_SIZE, oy, g, TILE_SIZE, COL_BACKGROUND);
draw_gt(dr, ox+TILE_SIZE+g4, oy+g2, g2, g2, -g2, g2,
(f & F_ERROR_RIGHT) ? COL_ERROR : col);
draw_update(dr, ox+TILE_SIZE, oy, g, TILE_SIZE);
}
if (f & F_ADJ_DOWN) {
+ draw_rect(dr, ox, oy + TILE_SIZE, TILE_SIZE, g, COL_BACKGROUND);
draw_gt(dr, ox+g2, oy+TILE_SIZE+g4, g2, g2, g2, -g2,
(f & F_ERROR_DOWN) ? COL_ERROR : col);
draw_update(dr, ox, oy+TILE_SIZE, TILE_SIZE, g);
}
if (f & F_ADJ_LEFT) {
+ draw_rect(dr, ox - g, oy, g, TILE_SIZE, COL_BACKGROUND);
draw_gt(dr, ox-g4, oy+g2, -g2, g2, g2, g2,
(f & F_ERROR_LEFT) ? COL_ERROR : col);
draw_update(dr, ox-g, oy, g, TILE_SIZE);
return 0.0F;
}
+static int game_is_solved(game_state *state)
+{
+ return state->completed;
+}
+
static int game_timing_state(game_state *state, game_ui *ui)
{
return TRUE;
game_redraw,
game_anim_length,
game_flash_length,
+ game_is_solved,
TRUE, FALSE, game_print_size, game_print,
FALSE, /* wants_statusbar */
FALSE, game_timing_state,