From 50be320c33bd942b238e8f82aa34230539878bab Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 28 Jul 2026 12:50:36 +0200 Subject: changes --- src/board.hpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/board.hpp') diff --git a/src/board.hpp b/src/board.hpp index 592b438..e9e3570 100644 --- a/src/board.hpp +++ b/src/board.hpp @@ -52,7 +52,26 @@ struct Move { Position From; Position To; - bool operator==(const Move &) const = default; + PieceType promotion = NONE; + bool operator==(const Move &other) const { + return From == other.From && To == other.To && promotion == other.promotion; + } +}; +struct UndoMove { + Piece movedPiece; + Piece capturedPiece; + + Position from; + Position to; + + bool oldTurn; + bool oldCanEnpassant; + Position oldEnPassant; + std::string oldCaslte; + int oldHalfMoveClock; + int oldMoveClock; + std::unordered_map OldThreeFoldMap; + GameState oldState; }; void printBoard(Game *b); Piece createPiece(PieceType type, bool color, bool moved = false); -- cgit v1.2.3