Commit graph

4 commits

Author SHA1 Message Date
ac07a8d6cf [position] Implement SliderRayToSquareExt on Shape instead of PlacedPiece
Add an origin square argument to its one method ::ray_to_square(). Pushing this
implementation down a layer means I don't have to care about the color of the
piece.
2024-02-02 07:29:43 -08:00
f1a05f33c9 [position] Factor out the update_moves_with_ray! as ray_in_direction!
This macro is implemented in every sight method. Factor it out, rename it, and
use it in all these macros.
2024-02-01 08:43:03 -08:00
722a90b860 [position] Implement a SliderRayToSquare trait
This trait declares ray_to_square() which should return a BitBoard representing
a ray from a Square to another Square. The ray should include the target Square.

PlacedPiece implements this trait.
2024-02-01 08:42:19 -08:00
220da08727 Directly rename board -> position 2024-01-28 09:56:57 -08:00
Renamed from board/src/sight.rs (Browse further)