No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
move_to(Move(bookMove)), PieceType(p + 1)));
// Verify the book move (if any) is legal
- MoveStack mlist[MOVES_MAX];
+ MoveStack mlist[MAX_MOVES];
MoveStack* last = generate<MV_LEGAL>(pos, mlist);
for (MoveStack* cur = mlist; cur != last; cur++)
if ((int(cur->move) & ~(3 << 14)) == bookMove) // Mask out special flags
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);
for (MoveStack* cur = mlist; cur != last; cur++)
assert(pos.is_ok());
assert(move_is_ok(m));
- MoveStack mlist[MOVES_MAX];
+ MoveStack mlist[MAX_MOVES];
Square from = move_from(m);
Square to = move_to(m);
PieceType pt = pos.type_of_piece_on(from);
#include "types.h"
// 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
///
int searchTT = ttm;
ttMoves[0].move = ttm;
badCaptureThreshold = 0;
- badCaptures = moves + MOVES_MAX;
+ badCaptures = moves + MAX_MOVES;
assert(d > DEPTH_ZERO);
// Bad captures SEE value is already calculated so just pick
// them in order to get SEE move ordering.
curMove = badCaptures;
- lastMove = moves + MOVES_MAX;
+ lastMove = moves + MAX_MOVES;
return;
case PH_EVASIONS:
int badCaptureThreshold, phase;
const uint8_t* phasePtr;
MoveStack *curMove, *lastMove, *lastGoodNonCapture, *badCaptures;
- MoveStack moves[MOVES_MAX];
+ MoveStack moves[MAX_MOVES];
};
#endif // !defined(MOVEPICK_H_INCLUDED)
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);
for (cur = mlist; cur != last; cur++)
bool Position::is_mate() const {
- MoveStack moves[MOVES_MAX];
+ MoveStack moves[MAX_MOVES];
return is_check() && generate<MV_LEGAL>(*this, moves) == moves;
}
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
int64_t perft(Position& pos, Depth depth) {
- MoveStack mlist[MOVES_MAX];
+ MoveStack mlist[MAX_MOVES];
StateInfo st;
Move m;
int64_t sum = 0;
assert(PvNode || alpha == beta - 1);
assert(pos.thread() >= 0 && pos.thread() < ThreadsMgr.active_threads());
- Move movesSearched[MOVES_MAX];
+ Move movesSearched[MAX_MOVES];
int64_t nodes;
StateInfo st;
const TTEntry *tte;
void RootMoveList::init(Position& pos, Move searchMoves[]) {
- MoveStack mlist[MOVES_MAX];
+ MoveStack mlist[MAX_MOVES];
Move* sm;
clear();
string token;
int time[] = { 0, 0 }, inc[] = { 0, 0 };
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;
while (up >> token)