diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/board.h | 9 | ||||
-rw-r--r-- | include/piece.h | 8 | ||||
-rw-r--r-- | include/print.h | 10 | ||||
-rw-r--r-- | include/types.h | 21 |
4 files changed, 48 insertions, 0 deletions
diff --git a/include/board.h b/include/board.h new file mode 100644 index 0000000..94763dc --- /dev/null +++ b/include/board.h @@ -0,0 +1,9 @@ +#ifndef _BOARD +#define _BOARD + +#include "types.h" + +Board board_init(); +int board_delete(Board*); + +#endif diff --git a/include/piece.h b/include/piece.h new file mode 100644 index 0000000..75b4fc7 --- /dev/null +++ b/include/piece.h @@ -0,0 +1,8 @@ +#ifndef _PIECE +#define _PIECE + +#include "types.h" + +int piece_character(Piece p); + +#endif diff --git a/include/print.h b/include/print.h new file mode 100644 index 0000000..bc2f9df --- /dev/null +++ b/include/print.h @@ -0,0 +1,10 @@ +#ifndef _PRINT +#define _PRINT + +#include "types.h" + +void print_piece(Piece); +void print_square(Square); +void print_board(Board*); + +#endif diff --git a/include/types.h b/include/types.h new file mode 100644 index 0000000..7618916 --- /dev/null +++ b/include/types.h @@ -0,0 +1,21 @@ +#ifndef _TYPES +#define _TYPES + +#define SIZE 8 + +typedef enum {WHITE, BLACK} Color; +typedef enum {PAWN, ROCK, KNIGHT, BISHOP, QUEEN, KING} PieceType; + +typedef struct { + Color color; + PieceType type; +} Piece; + +typedef struct { + Color color; + Piece* piece; +} Square; + +typedef Square** Board; + +#endif |