|
| constexpr auto | castle_kingside (const Color color) noexcept -> Move |
| constexpr auto | castle_queenside (const Color color) noexcept -> Move |
| template<Color Side> |
| constexpr auto | num_squares_attacked (const Pieces &pieces, Bitboard targetSquares, Bitboard enemyPieces, bool includeKing=true) noexcept -> size_t |
| constexpr auto | operator<=> (const Move &first, const Move &second) noexcept -> std::strong_ordering |
| template<bool IsRoot> |
| auto | perft (const size_t depth, const game::Position &startingPosition) -> PerftResult |
| template<bool IsRoot = true> |
| auto | perft (size_t depth, const game::Position &startingPosition) -> PerftResult |
| constexpr auto | promotion (const File file, const Color color, const PieceType promotedType) noexcept -> Move |
| template<Color Side> |
| constexpr auto | squares_attacked (const Pieces &pieces, Bitboard targetSquares, Bitboard enemyPieces) noexcept -> bool |
| using | MoveList = beman::inplace_vector::inplace_vector<Move, MAX_MOVES> |
| constexpr auto | MAX_MOVES = 256uz |
| template<bool CapturesOnly = false> |
| void | generate (const Position &position, std::output_iterator< Move > auto outputIt) |
| template<bool CapturesOnly = false> |
| auto | generate (const Position &position) -> MoveList |
| template<bool CapturesOnly = false> |
| void | generate_for (const Position &position, PieceType piece, std::output_iterator< Move > auto outputIt) |
| template<bool CapturesOnly = false> |
| auto | generate_for (const Position &position, PieceType piece) -> MoveList |
| auto | any_legal_moves (const Position &position) -> bool |
This namespace contains classes for modeling moves.
template<bool CapturesOnly = false>
Generates a list of all legal moves for only the given piece type in the given position.
Generating King moves will include castling. Generating pawn moves will include all pushes, double pushes, captures, promotions, and en passant captures.
- See also
- generate()
Definition at line 766 of file MoveGen.hpp.
template<bool CapturesOnly = false>
| void chess::moves::generate_for |
( |
const Position & | position, |
|
|
PieceType | piece, |
|
|
std::output_iterator< Move > auto | outputIt ) |
Generates a list of all legal moves for only the given piece type in the given position.
Generating King moves will include castling. Generating pawn moves will include all pushes, double pushes, captures, promotions, and en passant captures.
- See also
- generate()
Definition at line 755 of file MoveGen.hpp.