Closed bautoff closed 4 years ago
>>> import chess
>>> chess.between(chess.B3, chess.G3) # bitboard
3932160
>>> print(chess.SquareSet(chess.between(chess.B3, chess.G3)))
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . 1 1 1 1 . .
. . . . . . . .
. . . . . . . .
So far this feature isn't documented anywhere. Will do.
Thank you! I think it would be very useful if you also wrapped this feature into a separate function.
Is there a way to find all squares between two given squares on the diagonal/file/rank? E.g. there are [c3, d3, f3] between b3 and g3; [d4, c5] between e3 and b6 etc.