Started to make the piece move
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user