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.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/bitboard.c (limited to 'src/bitboard.c') diff --git a/src/bitboard.c b/src/bitboard.c new file mode 100644 index 0000000..05b370b --- /dev/null +++ b/src/bitboard.c @@ -0,0 +1,25 @@ +#include "bitboard.h" + +position starting_position() { + return (position) { + .bitboards = { + 1152921504606846976ULL, + 576460752303423488ULL, + 9295429630892703744ULL, + 4755801206503243776ULL, + 2594073385365405696ULL, + 71776119061217280ULL, + 16ULL, + 8ULL, + 129ULL, + 66ULL, + 36ULL, + 65280ULL + }, + .castling = + (1 << WHITE_SHORT_CASTLE) | + (1 << WHITE_LONG_CASTLE) | + (1 << BLACK_SHORT_CASTLE) | + (1 << BLACK_LONG_CASTLE), + }; +} -- cgit v1.2.3