genDirectionOffset

This commit is contained in:
2023-12-10 22:42:56 +01:00
parent ad2f8a7005
commit 5964cd7239
19 changed files with 356 additions and 31 deletions

21
src/types.h Normal file
View File

@ -0,0 +1,21 @@
#include <stdbool.h>
#include <stdint.h>
#define BOARD_SIZE 8
#define TOTAL_BOARD_SIZE BOARD_SIZE * BOARD_SIZE
#define LENGTH(array) (sizeof array / sizeof *array)
enum pieces {
NOTHING,
KING,
QUEEN,
ROOK,
BISHOP,
KNIGHT,
PAWN
};
struct piece_t {
uint_least8_t type;
bool white;
};