From 8519f03c6f68e0fd8fc494e51bc0fb19f18c39cd Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Thu, 1 Oct 2009 19:55:18 +0200 Subject: [PATCH] coord_is_8adjecent(): Also introduce --- move.h | 1 + 1 file changed, 1 insertion(+) diff --git a/move.h b/move.h index 36cf8fc..8fe1659 100644 --- a/move.h +++ b/move.h @@ -24,6 +24,7 @@ static coord_t resign = -2; #define coord_xy_otf(x, y, board) coord_xy(board, x, y) // obsolete #define coord_is_adjecent(c1, c2, b) (abs(c1 - c2) == 1 || abs(c1 - c2) == board_size(b)) +#define coord_is_8adjecent(c1, c2, b) (abs(c1 - c2) == 1 || abs(abs(c1 - c2) - board_size(b)) < 2) /* dyn allocated */ static coord_t *coord_init(int x, int y, int size); -- 2.11.4.GIT