diff --git a/source/board.cpp b/source/board.cpp index be515c8..ebb845c 100644 --- a/source/board.cpp +++ b/source/board.cpp @@ -6,10 +6,6 @@ #include #include "utils.h" -void Board::Init() { - SetByFen(StartingFen); -} - void Board::Reset() { castlingRights = 0; enPassantTarget = noEPTarget; @@ -20,6 +16,8 @@ void Board::Reset() { colors = std::array(); moveList = std::array(); + attackMaps = std::array, 2>(); + currentMoveIndex = 0; hashKey = 0ULL; diff --git a/source/board.h b/source/board.h index 3ef20c9..aeb9ee2 100644 --- a/source/board.h +++ b/source/board.h @@ -13,12 +13,13 @@ inline U64 positionHistory[1000]; class Board { public: Board() { - Init(); + SetByFen(StartingFen); } std::array pieces; std::array colors; - U64 attackMaps[2][64]; + std::array, 2> attackMaps; + //U64 attackMaps[2][64]; Bitboard occupied;