~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove strange punctuation.
[sgt/puzzles]
/
unequal.c
diff --git
a/unequal.c
b/unequal.c
index
91ae118
..
320dedf
100644
(file)
--- a/
unequal.c
+++ b/
unequal.c
@@
-408,6
+408,11
@@
static int c2n(int c, int order) {
return -1;
}
return -1;
}
+static int game_can_format_as_text_now(game_params *params)
+{
+ return TRUE;
+}
+
static char *game_text_format(game_state *state)
{
int x, y, len, n;
static char *game_text_format(game_state *state)
{
int x, y, len, n;
@@
-1266,7
+1271,8
@@
static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds,
button &= ~MOD_MASK;
button &= ~MOD_MASK;
- if (x >= 0 && x < ds->order && y >= 0 && y < ds->order) {
+ if (x >= 0 && x < ds->order && ((ox - COORD(x)) <= TILE_SIZE) &&
+ y >= 0 && y < ds->order && ((oy - COORD(y)) <= TILE_SIZE)) {
if (button == LEFT_BUTTON) {
/* normal highlighting for non-immutable squares */
if (GRID(state, flags, x, y) & F_IMMUTABLE)
if (button == LEFT_BUTTON) {
/* normal highlighting for non-immutable squares */
if (GRID(state, flags, x, y) & F_IMMUTABLE)
@@
-1735,7
+1741,7
@@
const struct game thegame = {
dup_game,
free_game,
TRUE, solve_game,
dup_game,
free_game,
TRUE, solve_game,
- TRUE, game_text_format,
+ TRUE, game_
can_format_as_text_now, game_
text_format,
new_ui,
free_ui,
encode_ui,
new_ui,
free_ui,
encode_ui,