From d69c731bde5cf2c958c794f505684365072ab64a Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 28 Jul 2026 13:52:49 +0200 Subject: adding make move and unmake move --- src/board.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/board.hpp') diff --git a/src/board.hpp b/src/board.hpp index e9e3570..70c5502 100644 --- a/src/board.hpp +++ b/src/board.hpp @@ -64,13 +64,17 @@ struct UndoMove { Position from; Position to; + bool wasEnPassantCapture = false; + Position enPassantCapturedSquare; + Piece enPassantCapturedPiece; + bool oldTurn; bool oldCanEnpassant; Position oldEnPassant; std::string oldCaslte; int oldHalfMoveClock; int oldMoveClock; - std::unordered_map OldThreeFoldMap; + uint64_t zobristKey; GameState oldState; }; void printBoard(Game *b); @@ -78,4 +82,6 @@ Piece createPiece(PieceType type, bool color, bool moved = false); void PlayMove(Move move, Game *b); int PositionToIndex(Position i); +UndoMove MakeMove(Move move, Game *g); +void UnMake(UndoMove undo, Game *g); #endif /* SRC_BOARD_H_ */ -- cgit v1.2.3