- PieceType type_of_piece_on(Square s) const;
- Color color_of_piece_on(Square s) const;
- bool square_is_empty(Square s) const;
- bool square_is_occupied(Square s) const;
- Value midgame_value_of_piece_on(Square s) const;
- Value endgame_value_of_piece_on(Square s) const;
-
- // Side to move
- Color side_to_move() const;
-
- // Bitboard representation of the position
- Bitboard empty_squares() const;
- Bitboard occupied_squares() const;
- Bitboard pieces_of_color(Color c) const;
- Bitboard pieces_of_type(PieceType pt) const;
-
- // Pieces by constant type of both colors
- template<PieceType Piece> Bitboard pieces() const { return byTypeBB[Piece]; }
- template<> Bitboard pieces<BISHOP_AND_QUEEN>() const { return byTypeBB[BISHOP] | byTypeBB[QUEEN]; }
- template<> Bitboard pieces<ROOK_AND_QUEEN>() const { return byTypeBB[ROOK] | byTypeBB[QUEEN]; }
-
- // Pieces by constant type of a given color
- template<PieceType Piece> Bitboard pieces(Color c) const { return byColorBB[c] & pieces<Piece>(); }
-
- // Number of pieces of each color and type
- int piece_count(Color c, PieceType pt) const;
-
- // The en passant square
- Square ep_square() const;
-
- // Current king position for each color