From 9cd36deffadc4f5ab83f08c2999407b31354027e Mon Sep 17 00:00:00 2001 From: Aargh Rai Date: Fri, 20 Feb 2026 17:04:46 +0530 Subject: some moves dynamic array setup & starting position --- src/bitboard.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/bitboard.h (limited to 'src/bitboard.h') diff --git a/src/bitboard.h b/src/bitboard.h new file mode 100644 index 0000000..b92d67f --- /dev/null +++ b/src/bitboard.h @@ -0,0 +1,38 @@ +#ifndef BITBOARD_H +#define BITBOARD_H + +#include "ints.h" + +typedef u64 bitboard_t; + +enum { + WHITE_KING, + WHITE_QUEEN, + WHITE_ROOK, + WHITE_BISHOP, + WHITE_KNIGHT, + WHITE_PAWN, + BLACK_KING, + BLACK_QUEEN, + BLACK_ROOK, + BLACK_BISHOP, + BLACK_KNIGHT, + BLACK_PAWN, + PIECE_TYPE_COUNT, +}; + +enum { + WHITE_SHORT_CASTLE, + WHITE_LONG_CASTLE, + BLACK_SHORT_CASTLE, + BLACK_LONG_CASTLE, +}; + +typedef struct { + bitboard_t bitboards[PIECE_TYPE_COUNT]; + u8 castling; +} position; + +position starting_position(); + +#endif // !BITBOARD_H -- cgit v1.2.3