41 for (; pos && m_arrayPrioQueue[pos - 1].score >=
score; --pos)
42 m_arrayPrioQueue[pos] = m_arrayPrioQueue[pos - 1];
43 m_arrayPrioQueue[pos].move =
move;
44 m_arrayPrioQueue[pos].score =
score;
52 return size ? m_arrayPrioQueue[--size].move : UINT64_C(0);
56 unsigned int getSize()
const {
return size; }
void reset()
Empty the queue without freeing any memory.
TBitBoard move
Single-bit move mask.
unsigned int getSize() const
Number of moves currently stored.
MoveList()
Construct an empty move list.
TBitBoard pop()
Remove and return the highest-priority move.
void insert(const TBitBoard move, const int score)
Insert a (move, score) pair while keeping the queue sorted.
uint64_t TBitBoard
64-bit bitboard type (mirrors the alias defined in Board.h).
static constexpr int N_COLUMNS
Maximum number of moves the queue can hold.
Top-level namespace for the BitBully Connect-4 engine.