- inline Bitboard forward_white(Bitboard b) { return b << 8; }
- inline Bitboard forward_right_white(Bitboard b) { return b << 9; }
- inline Bitboard forward_left_white(Bitboard b) { return b << 7; }
-
- inline Bitboard forward_black(Bitboard b) { return b >> 8; }
- inline Bitboard forward_right_black(Bitboard b) { return b >> 7; }
- inline Bitboard forward_left_black(Bitboard b) { return b >> 9; }
-
- struct PawnOffsets {
-
- Bitboard Rank3BB, Rank8BB;
- Rank RANK_8;
- SquareDelta DELTA_N, DELTA_NE, DELTA_NW;
- Color us, them;
- typedef Bitboard (*Shift_fn)(Bitboard b);
- Shift_fn forward, forward_left, forward_right;
- };
-
- const PawnOffsets WhitePawnOffsets = { Rank3BB, Rank8BB, RANK_8, DELTA_N, DELTA_NE, DELTA_NW, WHITE, BLACK,
- &forward_white, forward_left_white, forward_right_white };
-
- const PawnOffsets BlackPawnOffsets = { Rank6BB, Rank1BB, RANK_1, DELTA_S, DELTA_SE, DELTA_SW, BLACK, WHITE,
- &forward_black, &forward_left_black, &forward_right_black };
-
- int generate_pawn_captures(const PawnOffsets&, const Position&, MoveStack*);
- int generate_pawn_noncaptures(const PawnOffsets&, const Position&, MoveStack*);
- int generate_pawn_checks(const PawnOffsets&, const Position&, Bitboard, Square, MoveStack*, int);
- int generate_piece_checks(PieceType, const Position&, Bitboard, Bitboard, Square, MoveStack*, int);
- int generate_piece_moves(PieceType, const Position&, MoveStack*, Color, Bitboard);
- int generate_castle_moves(const Position&, MoveStack*, Color);
- int generate_piece_blocking_evasions(PieceType, const Position&, Bitboard, Bitboard, MoveStack*, int);
- int generate_pawn_blocking_evasions(const PawnOffsets&, const Position&, Bitboard, Bitboard, MoveStack*, int);
-}
-