- enum MovegenPhase {
- PH_TT_MOVE, // Transposition table move
- PH_MATE_KILLER, // Mate killer from the current ply
- PH_GOOD_CAPTURES, // Queen promotions and captures with SEE values >= 0
- PH_KILLERS, // Killer moves from the current ply
- PH_NONCAPTURES, // Non-captures and underpromotions
- PH_BAD_CAPTURES, // Queen promotions and captures with SEE values < 0
- PH_EVASIONS, // Check evasions
- PH_QCAPTURES, // Captures in quiescence search
- PH_QCHECKS, // Non-capture checks in quiescence search
- PH_STOP
- };
-
- MovePicker(const Position& p, bool pvnode, Move ttm, Depth d, SearchStack* ss = NULL);
- Move get_next_move();
- Move get_next_move(Lock& lock);
- int number_of_moves() const;
- Bitboard discovered_check_candidates() const;
-
- static void init_phase_table();
+ void clear() { memset(table, 0, sizeof(table)); }
+ void update(Piece p, Square to, Move m) { table[p][to] = m; }
+ Move get(Piece p, Square to) const { return table[p][to]; }