#define BARREL_LABEL(b) ( (b)>='A'&&(b)<='Z' ? (b) : \
(b)>=1 && (b)<=26 ? (b)+('A'-1) : 0 )
-#define DX(d) (d == 0 ? -1 : d == 2 ? +1 : 0);
-#define DY(d) (d == 1 ? -1 : d == 3 ? +1 : 0);
+#define DX(d) (d == 0 ? -1 : d == 2 ? +1 : 0)
+#define DY(d) (d == 1 ? -1 : d == 3 ? +1 : 0)
#define FLASH_LENGTH 0.3F
return NULL;
}
+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 *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds,
int x, int y, int button)
{
- int dx, dy;
+ int dx=0, dy=0;
char *move;
/*
dx = -1, dy = +1;
else if (button == (MOD_NUM_KEYPAD | '3'))
dx = +1, dy = +1;
+ else if (button == LEFT_BUTTON)
+ {
+ if(x < COORD(state->px))
+ dx = -1;
+ else if (x > COORD(state->px + 1))
+ dx = 1;
+ if(y < COORD(state->py))
+ dy = -1;
+ else if (y > COORD(state->py + 1))
+ dy = 1;
+ }
else
return NULL;
+ if((dx == 0) && (dy == 0))
+ return(NULL);
+
if (move_type(state, dx, dy) < 0)
return NULL;
dup_game,
free_game,
FALSE, solve_game,
- FALSE, game_text_format,
+ FALSE, game_can_format_as_text_now, game_text_format,
new_ui,
free_ui,
encode_ui,