diff options
| author | Adam <adammegarules1@gmail.com> | 2026-07-28 13:52:49 +0200 |
|---|---|---|
| committer | Adam <adammegarules1@gmail.com> | 2026-07-28 13:52:49 +0200 |
| commit | d69c731bde5cf2c958c794f505684365072ab64a (patch) | |
| tree | 9d7736486908788355ad9bd1bc8d32ae942ecdb6 /src/board.hpp | |
| parent | 50be320c33bd942b238e8f82aa34230539878bab (diff) | |
adding make move and unmake move
Diffstat (limited to 'src/board.hpp')
| -rw-r--r-- | src/board.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
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<uint64_t, int> 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_ */ |
