Closed miguel-ambrona closed 1 month ago
Ok, I guess this works without increasing self.index
because of two properties:
self.moves
have a non-empty .bitboard
(at least initially).Function set_iterator_mask
does some magic: it sorts the moves in such a way that the ones with remaining destinies always go first.
I would then rephrase the above comment: // are we done?
-> // we are done
, or just remove it. It confused me a little.
I'm puzzled by this first case: https://github.com/jordanbray/chess/blob/main/src/movegen/movegen.rs#L302-L306
Shouldn't we increase
self.index
before returningNone
?