Fix the remaining tests

Well… all the tests except the Peter Ellis Jones tests.

Pass around whole EnPassant types instead of pulling out just the e.p. square.
Make sure that Castling moves have their target and origin squares populated.
Add a color field to the Castle move style to make this possible.
This commit is contained in:
Eryn Wells 2024-02-25 12:38:55 -08:00
parent d2fe546824
commit 5f1fce6cc2
10 changed files with 142 additions and 83 deletions

View file

@ -242,6 +242,7 @@ mod tests {
use crate::test_position;
use chessfriend_bitboard::{bitboard, BitBoard};
use chessfriend_core::{piece, Square};
use chessfriend_moves::EnPassant;
sight_test!(e4_pawn, piece!(White Pawn on E4), bitboard!(D5, F5));
@ -289,7 +290,7 @@ mod tests {
White Pawn on E5,
Black Pawn on D5,
);
pos.test_set_en_passant_square(Square::D6);
pos.test_set_en_passant(EnPassant::from_target_square(Square::D6).unwrap());
let piece = piece!(White Pawn on E5);
let sight = pos.sight_of_piece(&piece);