X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovegen.cpp;h=4c609352358cbbf797aa8b0805dbc1e98e7b7e56;hp=5ed248933ce132b6ad820b6dc0ed0fb466266bfd;hb=a9cca5c953e6ccec865102b13b47b9f45d98a0fc;hpb=3c576efa77f431cf3687881b8fd6a728e87ed97d diff --git a/src/movegen.cpp b/src/movegen.cpp index 5ed24893..4c609352 100644 --- a/src/movegen.cpp +++ b/src/movegen.cpp @@ -93,10 +93,10 @@ namespace { // if the pawn is not on the same file as the enemy king, because we // don't generate captures. Note that a possible discovery check // promotion has been already generated amongst the captures. - Bitboard dcCandidates = pos.blockers_for_king(Them); - if (pawnsNotOn7 & dcCandidates) + Bitboard dcCandidateQuiets = pos.blockers_for_king(Them) & pawnsNotOn7; + if (dcCandidateQuiets) { - Bitboard dc1 = shift(pawnsNotOn7 & dcCandidates) & emptySquares & ~file_bb(ksq); + Bitboard dc1 = shift(dcCandidateQuiets) & emptySquares & ~file_bb(ksq); Bitboard dc2 = shift(dc1 & TRank3BB) & emptySquares; b1 |= dc1; @@ -252,14 +252,11 @@ namespace { } // namespace -/// generate generates all pseudo-legal captures and queen -/// promotions. Returns a pointer to the end of the move list. +/// Generates all pseudo-legal captures and queen promotions +/// Generates all pseudo-legal non-captures and underpromotions +/// Generates all pseudo-legal captures and non-captures /// -/// generate generates all pseudo-legal non-captures and -/// underpromotions. Returns a pointer to the end of the move list. -/// -/// generate generates all pseudo-legal captures and -/// non-captures. Returns a pointer to the end of the move list. +/// Returns a pointer to the end of the move list. template ExtMove* generate(const Position& pos, ExtMove* moveList) {