bb: bb_{first_bb,next,multiple{}, chessdefs: relative sq diffs

This commit is contained in:
2024-04-04 10:03:43 +02:00
parent 30af886594
commit 027aa2c132
4 changed files with 106 additions and 44 deletions

View File

@@ -134,6 +134,11 @@ typedef enum {
NORTH_WEST = (NORTH + WEST),
} dir_t;
/* define diff for relative squares */
#define sq_up(c) ((c) == WHITE ? NORTH: SOUTH)
#define sq_upleft(c) ((c) == WHITE ? NORTH_WEST: SOUTH_EAST)
#define sq_upright(c) ((c) == WHITE ? NORTH_EAST: SOUTH_WEST)
#include <time.h>
typedef struct mclock {