#pragma once #include enum win_t { WIN_NONE, WIN_P0, WIN_P1, WIN_DRAW, }; struct Board { // as bit array: [16 * y + 4 * x + z] // (x,y) = floor position, z = height with z=0 on the bottom uint64_t bd[2]; static Board empty(); static Board uninitialised(); void drop(int xy, int v); bool stkFull(int xy) const; win_t checkWin() const; uint64_t hash() const; int numFilled() const; bool isEmpty() const; int numValidMoves() const; int playerToMove() const; bool operator==(const Board &other) const; protected: Board() = default; };