From 628b9fcc429bdb2df4b0ad110082b88004615f6f Mon Sep 17 00:00:00 2001 From: Moritz Eigenauer Date: Wed, 12 Nov 2025 18:19:21 +0100 Subject: [PATCH] syncing between desktops --- src/board.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/board.rs b/src/board.rs index afd8efd..3b1335a 100644 --- a/src/board.rs +++ b/src/board.rs @@ -313,16 +313,24 @@ impl Board { println!("============================================\n"); } - pub fn make_move(&mut self, mv: Move) { + pub fn make_move(&mut self, mv: Move) -> UndoMove { let from = mv.value()& MOVE_FROM_MASK; let to = mv.value() & MOVE_TO_MASK; let flag = mv.value() & MOVE_FLAG_MASK; - // promo must come first because of double usage of the flag bits + //// TODO keep going here actually make the move on the board <<<<<<<<<<<<<<<<<<<<<<<<<<<<< if flag & MOVE_FLAG_CAPTURE > 0 { - + return UndoMove::new(mv, + Some(PieceType::Pawn), // PLACEHOLDER!!!!!!!!!!!!!!!!!!!! + self.en_passant_target, + self.castling_rights, + self.halfmove_clock); } else { // No capture - + return UndoMove::new(mv, + None, + self.en_passant_target, + self.castling_rights, + self.halfmove_clock); } } }