Modules and Makefile

This commit is contained in:
cdricms
2023-12-20 23:32:19 +01:00
parent 6cba000233
commit 11781e37ff
9 changed files with 90 additions and 44 deletions

18
src/board.h Normal file
View File

@@ -0,0 +1,18 @@
#ifndef __BOARD_HEADER
#include "common.h"
typedef int Piece;
typedef enum { Pawn = 0, Knight, Bishop, Rook, Queen, King } Pieces;
typedef enum { White = 0, Black = 8 } PieceColors;
typedef struct {
Piece piece;
uint row;
uint column;
} Square;
typedef Square Board[64];
PieceColors piece_getColor(const Piece piece);
Piece piece_getColorlessPiece(const Piece piece);
#endif // !__BOARD_HEADER