Started to make the piece move

This commit is contained in:
cdricms
2023-12-21 00:48:10 +01:00
parent 11781e37ff
commit 619d03ab53
5 changed files with 31 additions and 4 deletions

View File

@@ -1,13 +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;
} Coordinates;
typedef struct {
Piece piece;
Coordinates coords;
} Square;
typedef Square Board[64];
@@ -15,4 +20,6 @@ typedef Square Board[64];
PieceColors piece_getColor(const Piece piece);
Piece piece_getColorlessPiece(const Piece piece);
bool board_movePiece(Board board, const Coordinates from, const Coordinates to);
#endif // !__BOARD_HEADER