Define some constants in Square that refer to the starting positions of the two
kings, and the target castling squares. Then implement the following methods that
use those constants to determine if a move is a castle.
- Move::is_kingside_castle()
- Move::is_queenside_castle()
- Move::is_castle()
These checks only apply to King moves, and if the king is moving from and to
specific squares.
This struct implements an Iterator that returns the positions of the 1 bits in the u64.
BitBoard takes this iterator and maps it into Squares in the pieces() method.
This is laying the groundwork for an iterator over the pieces in a Position. 👀
Use the Direction enum to calculate the neighbor of a square with bounds checking.
Remove the unused rank_index() and file_index methods.
Add Square::from_rank_file and Square::from_index_unsafe to support tests.
Unify the Square*OutOfBounds error types