[position] Move make_move to its own module: position::make_move

Rework sight.rs and add a new module, movement.rs, to calculate piece sight and
movement. I discovered during this process that "sight" and "movement" are different
because pawns (in particular) can move in ways that don't follow their sight lines.
The routines in the movement module account for this, but also pass through to the
sight routines for other pieces.
This commit is contained in:
Eryn Wells 2025-05-18 08:08:47 -07:00
parent 669a7c00ec
commit a78526befa
6 changed files with 459 additions and 283 deletions

View file

@ -1,9 +1,9 @@
// Eryn Wells <eryn@erynwells.me>
mod builders;
mod make_move;
mod position;
pub use {
builders::{MakeMoveError, MoveBuilder},
make_move::{MakeMoveError, ValidateMove},
position::Position,
};