+static void draw_arrow_for_cursor(drawing *dr, game_drawstate *ds,
+ int cur_x, int cur_y, int cur)
+{
+ if (cur_x == -1 && cur_y == -1)
+ return; /* 'no cursur here */
+ else if (cur_x == -1) /* LH column. */
+ draw_arrow(dr, ds, COORD(0), COORD(cur_y+1), 0, -1, cur);
+ else if (cur_x == ds->w) /* RH column */
+ draw_arrow(dr, ds, COORD(ds->w), COORD(cur_y), 0, +1, cur);
+ else if (cur_y == -1) /* Top row */
+ draw_arrow(dr, ds, COORD(cur_x), COORD(0), +1, 0, cur);
+ else if (cur_y == ds->h) /* Bottom row */
+ draw_arrow(dr, ds, COORD(cur_x+1), COORD(ds->h), -1, 0, cur);
+ else
+ assert(!"Invalid cursor position");
+
+ draw_update(dr, COORD(cur_x), COORD(cur_y),
+ TILE_SIZE, TILE_SIZE);
+}
+
+static void game_redraw(drawing *dr, game_drawstate *ds, game_state *oldstate,