Commit graph

7 commits

Author SHA1 Message Date
db489af50b [position] Move unmake move stuff to an unmake_move module 2025-05-27 11:52:17 -07:00
e3ca466737 [position] Move capture list to a CapturesList struct
This one has a custom Display implementation for easier integration with Positon's.
2025-05-27 11:51:08 -07:00
609cda0fe5 [position] Remove castle module (it went to board) 2025-05-23 09:50:57 -07:00
97552302cb [position] Move castle evaluation code to its own submodule of position
Move the tests too.
2025-05-19 16:59:13 -07:00
0c1863acb9 [board, core, moves, position] Implement castling
Implement a new method on Position that evaluates whether the active color can castle
on a given wing of the board. Then, implement making a castling move in the position.

Make a new Wing enum in the core crate to specify kingside or queenside. Replace the
Castle enum from the board crate with this one. This caused a lot of churn...

Along the way fix a bunch of tests.

Note: there's still no way to actually make a castling move in explorer.
2025-05-19 16:50:30 -07:00
a78526befa [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.
2025-05-18 08:12:10 -07:00
f1431ea4e9 [position] Move postion/mod.rs -> position.rs 2025-05-08 17:54:49 -07:00
Renamed from position/src/position/mod.rs (Browse further)