Modules and Makefile
This commit is contained in:
18
src/board.h
Normal file
18
src/board.h
Normal 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
|
||||
Reference in New Issue
Block a user