/// will often get single-move PVs when the search stops while failing high,
/// and a single-move PV means that we don't have a ponder move.
-void TranspositionTable::extract_pv(const Position& pos, Move pv[], int pvSize) {
+void TranspositionTable::extract_pv(const Position& pos, Move pv[], const int PLY_MAX) {
const TTEntry* tte;
StateInfo st;
while (pv[ply] != MOVE_NONE)
p.do_move(pv[ply++], st);
- // Try to add moves from TT until possible
+ // Try to add moves from TT while possible
while ( (tte = retrieve(p.get_key())) != NULL
&& tte->move() != MOVE_NONE
&& move_is_legal(p, tte->move())
&& (!p.is_draw() || ply < 2)
- && ply < pvSize)
+ && ply < PLY_MAX)
{
pv[ply] = tte->move();
p.do_move(pv[ply++], st);