mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Rename MOVES_MAX in MAX_MOVES
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
ccd5ccbcdb
commit
c9d7e99de6
8 changed files with 14 additions and 14 deletions
|
@ -459,7 +459,7 @@ Move Book::get_move(const Position& pos, bool findBestMove) {
|
||||||
move_to(Move(bookMove)), PieceType(p + 1)));
|
move_to(Move(bookMove)), PieceType(p + 1)));
|
||||||
|
|
||||||
// Verify the book move (if any) is legal
|
// Verify the book move (if any) is legal
|
||||||
MoveStack mlist[MOVES_MAX];
|
MoveStack mlist[MAX_MOVES];
|
||||||
MoveStack* last = generate<MV_LEGAL>(pos, mlist);
|
MoveStack* last = generate<MV_LEGAL>(pos, mlist);
|
||||||
for (MoveStack* cur = mlist; cur != last; cur++)
|
for (MoveStack* cur = mlist; cur != last; cur++)
|
||||||
if ((int(cur->move) & ~(3 << 14)) == bookMove) // Mask out special flags
|
if ((int(cur->move) & ~(3 << 14)) == bookMove) // Mask out special flags
|
||||||
|
|
|
@ -70,7 +70,7 @@ const string move_to_uci(Move m, bool chess960) {
|
||||||
|
|
||||||
Move move_from_uci(const Position& pos, const string& str) {
|
Move move_from_uci(const Position& pos, const string& str) {
|
||||||
|
|
||||||
MoveStack mlist[MOVES_MAX];
|
MoveStack mlist[MAX_MOVES];
|
||||||
MoveStack* last = generate<MV_LEGAL>(pos, mlist);
|
MoveStack* last = generate<MV_LEGAL>(pos, mlist);
|
||||||
|
|
||||||
for (MoveStack* cur = mlist; cur != last; cur++)
|
for (MoveStack* cur = mlist; cur != last; cur++)
|
||||||
|
@ -90,7 +90,7 @@ const string move_to_san(Position& pos, Move m) {
|
||||||
assert(pos.is_ok());
|
assert(pos.is_ok());
|
||||||
assert(move_is_ok(m));
|
assert(move_is_ok(m));
|
||||||
|
|
||||||
MoveStack mlist[MOVES_MAX];
|
MoveStack mlist[MAX_MOVES];
|
||||||
Square from = move_from(m);
|
Square from = move_from(m);
|
||||||
Square to = move_to(m);
|
Square to = move_to(m);
|
||||||
PieceType pt = pos.type_of_piece_on(from);
|
PieceType pt = pos.type_of_piece_on(from);
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
// Maximum number of allowed moves per position
|
// Maximum number of allowed moves per position
|
||||||
const int MOVES_MAX = 256;
|
const int MAX_MOVES = 256;
|
||||||
|
|
||||||
/// A move needs 16 bits to be stored
|
/// A move needs 16 bits to be stored
|
||||||
///
|
///
|
||||||
|
|
|
@ -59,7 +59,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h,
|
||||||
int searchTT = ttm;
|
int searchTT = ttm;
|
||||||
ttMoves[0].move = ttm;
|
ttMoves[0].move = ttm;
|
||||||
badCaptureThreshold = 0;
|
badCaptureThreshold = 0;
|
||||||
badCaptures = moves + MOVES_MAX;
|
badCaptures = moves + MAX_MOVES;
|
||||||
|
|
||||||
assert(d > DEPTH_ZERO);
|
assert(d > DEPTH_ZERO);
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ void MovePicker::go_next_phase() {
|
||||||
// Bad captures SEE value is already calculated so just pick
|
// Bad captures SEE value is already calculated so just pick
|
||||||
// them in order to get SEE move ordering.
|
// them in order to get SEE move ordering.
|
||||||
curMove = badCaptures;
|
curMove = badCaptures;
|
||||||
lastMove = moves + MOVES_MAX;
|
lastMove = moves + MAX_MOVES;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case PH_EVASIONS:
|
case PH_EVASIONS:
|
||||||
|
|
|
@ -57,7 +57,7 @@ private:
|
||||||
int badCaptureThreshold, phase;
|
int badCaptureThreshold, phase;
|
||||||
const uint8_t* phasePtr;
|
const uint8_t* phasePtr;
|
||||||
MoveStack *curMove, *lastMove, *lastGoodNonCapture, *badCaptures;
|
MoveStack *curMove, *lastMove, *lastGoodNonCapture, *badCaptures;
|
||||||
MoveStack moves[MOVES_MAX];
|
MoveStack moves[MAX_MOVES];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !defined(MOVEPICK_H_INCLUDED)
|
#endif // !defined(MOVEPICK_H_INCLUDED)
|
||||||
|
|
|
@ -649,7 +649,7 @@ bool Position::pl_move_is_evasion(Move m, Bitboard pinned) const
|
||||||
|
|
||||||
bool Position::move_is_legal(const Move m) const {
|
bool Position::move_is_legal(const Move m) const {
|
||||||
|
|
||||||
MoveStack mlist[MOVES_MAX];
|
MoveStack mlist[MAX_MOVES];
|
||||||
MoveStack *cur, *last = generate<MV_PSEUDO_LEGAL>(*this, mlist);
|
MoveStack *cur, *last = generate<MV_PSEUDO_LEGAL>(*this, mlist);
|
||||||
|
|
||||||
for (cur = mlist; cur != last; cur++)
|
for (cur = mlist; cur != last; cur++)
|
||||||
|
@ -1795,7 +1795,7 @@ bool Position::is_draw() const {
|
||||||
|
|
||||||
bool Position::is_mate() const {
|
bool Position::is_mate() const {
|
||||||
|
|
||||||
MoveStack moves[MOVES_MAX];
|
MoveStack moves[MAX_MOVES];
|
||||||
return is_check() && generate<MV_LEGAL>(*this, moves) == moves;
|
return is_check() && generate<MV_LEGAL>(*this, moves) == moves;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -214,7 +214,7 @@ namespace {
|
||||||
|
|
||||||
inline int futility_move_count(Depth d) {
|
inline int futility_move_count(Depth d) {
|
||||||
|
|
||||||
return d < 16 * ONE_PLY ? FutilityMoveCountArray[d] : MOVES_MAX;
|
return d < 16 * ONE_PLY ? FutilityMoveCountArray[d] : MAX_MOVES;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 14. Reduced search
|
// Step 14. Reduced search
|
||||||
|
@ -418,7 +418,7 @@ void exit_threads() { ThreadsMgr.exit_threads(); }
|
||||||
|
|
||||||
int64_t perft(Position& pos, Depth depth) {
|
int64_t perft(Position& pos, Depth depth) {
|
||||||
|
|
||||||
MoveStack mlist[MOVES_MAX];
|
MoveStack mlist[MAX_MOVES];
|
||||||
StateInfo st;
|
StateInfo st;
|
||||||
Move m;
|
Move m;
|
||||||
int64_t sum = 0;
|
int64_t sum = 0;
|
||||||
|
@ -764,7 +764,7 @@ namespace {
|
||||||
assert(PvNode || alpha == beta - 1);
|
assert(PvNode || alpha == beta - 1);
|
||||||
assert(pos.thread() >= 0 && pos.thread() < ThreadsMgr.active_threads());
|
assert(pos.thread() >= 0 && pos.thread() < ThreadsMgr.active_threads());
|
||||||
|
|
||||||
Move movesSearched[MOVES_MAX];
|
Move movesSearched[MAX_MOVES];
|
||||||
int64_t nodes;
|
int64_t nodes;
|
||||||
StateInfo st;
|
StateInfo st;
|
||||||
const TTEntry *tte;
|
const TTEntry *tte;
|
||||||
|
@ -2490,7 +2490,7 @@ split_point_start: // At split points actual search starts from here
|
||||||
|
|
||||||
void RootMoveList::init(Position& pos, Move searchMoves[]) {
|
void RootMoveList::init(Position& pos, Move searchMoves[]) {
|
||||||
|
|
||||||
MoveStack mlist[MOVES_MAX];
|
MoveStack mlist[MAX_MOVES];
|
||||||
Move* sm;
|
Move* sm;
|
||||||
|
|
||||||
clear();
|
clear();
|
||||||
|
|
|
@ -205,7 +205,7 @@ namespace {
|
||||||
string token;
|
string token;
|
||||||
int time[] = { 0, 0 }, inc[] = { 0, 0 };
|
int time[] = { 0, 0 }, inc[] = { 0, 0 };
|
||||||
SearchLimits limits(0, 0, 0, 0, 0, 0, false, false);
|
SearchLimits limits(0, 0, 0, 0, 0, 0, false, false);
|
||||||
Move searchMoves[MOVES_MAX] = { MOVE_NONE };
|
Move searchMoves[MAX_MOVES] = { MOVE_NONE };
|
||||||
Move* cur = searchMoves;
|
Move* cur = searchMoves;
|
||||||
|
|
||||||
while (up >> token)
|
while (up >> token)
|
||||||
|
|
Loading…
Add table
Reference in a new issue