Skip to content

Commit 53f478a

Browse files
type correction
1 parent f708cbe commit 53f478a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/CLI.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ namespace Interface {
8989
} else if (arg == "perft") {
9090
const uint64_t hashBefore = board.hashCode;
9191
const int depth = std::stoi(instr.args[1]);
92-
const unsigned long long nodes = MoveGenerator::perft(depth, board);
92+
const uint64_t nodes = MoveGenerator::perft(depth, board);
9393
std::cout << nodes << std::endl;
9494
if (board.hashCode != hashBefore) {
9595
std::cout << "Hash mismatch" << std::endl;

src/MoveGenerator.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -222,16 +222,16 @@ bool MoveGenerator::inCheck(const ChessBoard&board, Color color) {
222222
return isSquareAttacked(board, kingPosition, color);
223223
}
224224

225-
unsigned long long MoveGenerator::perft(int depth, ChessBoard&board) {
225+
uint64_t MoveGenerator::perft(int depth, ChessBoard&board) {
226226
if (depth == 0) return 1ULL;
227-
unsigned long long nodes = 0ULL;
227+
uint64_t nodes = 0ULL;
228228

229229
const std::vector<Move> moves = pseudoLegalMoves(board);
230230

231231
for (const Move move: moves) {
232232
board.makeMove(move);
233233
if (!inCheck(board, invertColor(board.sideToMove))) {
234-
const unsigned long long childNodes = perft(depth - 1, board);
234+
const uint64_t childNodes = perft(depth - 1, board);
235235
nodes += childNodes;
236236
}
237237
board.unMakeMove();

src/MoveGenerator.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class MoveGenerator {
1010
static std::vector<Move> tacticalMoves(const ChessBoard& board);
1111
static bool isSquareAttacked(const ChessBoard& board, int_fast8_t square, Color color);
1212
static bool inCheck(const ChessBoard& board, Color color);
13-
static unsigned long long perft(int depth, ChessBoard& board);
13+
static uint64_t perft(int depth, ChessBoard& board);
1414
static bool isLegalMove(ChessBoard &board, Move move);
1515
};
1616

0 commit comments

Comments
 (0)