Refactor #26
No files matched your search
+2
-4
@@ -6,10 +6,6 @@
|
|||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
void Board::Init() {
|
|
||||||
SetByFen(StartingFen);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Board::Reset() {
|
void Board::Reset() {
|
||||||
castlingRights = 0;
|
castlingRights = 0;
|
||||||
enPassantTarget = noEPTarget;
|
enPassantTarget = noEPTarget;
|
||||||
@@ -20,6 +16,8 @@ void Board::Reset() {
|
|||||||
colors = std::array<Bitboard, 2>();
|
colors = std::array<Bitboard, 2>();
|
||||||
|
|
||||||
moveList = std::array<Move, 218>();
|
moveList = std::array<Move, 218>();
|
||||||
|
attackMaps = std::array<std::array<U64, 64>, 2>();
|
||||||
|
|
||||||
currentMoveIndex = 0;
|
currentMoveIndex = 0;
|
||||||
|
|
||||||
hashKey = 0ULL;
|
hashKey = 0ULL;
|
||||||
|
|||||||
+3
-2
@@ -13,12 +13,13 @@ inline U64 positionHistory[1000];
|
|||||||
class Board {
|
class Board {
|
||||||
public:
|
public:
|
||||||
Board() {
|
Board() {
|
||||||
Init();
|
SetByFen(StartingFen);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::array<Bitboard, 6> pieces;
|
std::array<Bitboard, 6> pieces;
|
||||||
std::array<Bitboard, 2> colors;
|
std::array<Bitboard, 2> colors;
|
||||||
U64 attackMaps[2][64];
|
std::array<std::array<U64, 64>, 2> attackMaps;
|
||||||
|
//U64 attackMaps[2][64];
|
||||||
|
|
||||||
Bitboard occupied;
|
Bitboard occupied;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user