diff options
Diffstat (limited to 'src/board.hpp')
| -rw-r--r-- | src/board.hpp | 21 |
1 files changed, 20 insertions, 1 deletions
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<uint64_t, int> OldThreeFoldMap; + GameState oldState; }; void printBoard(Game *b); Piece createPiece(PieceType type, bool color, bool moved = false); |
