From 8e47b8f9f8a017f25a1c9a9baba05b0bf9b12d2d Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 16 Aug 2026 11:22:34 +0200 Subject: perf(draw) instead of having a hash map for three fold repetion check now we have --- src/board/board.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/board/board.hpp') diff --git a/src/board/board.hpp b/src/board/board.hpp index 133a280..e3692f6 100644 --- a/src/board/board.hpp +++ b/src/board/board.hpp @@ -3,6 +3,7 @@ #include #include +#include enum PieceType : std::uint8_t { NONEPIECE, @@ -67,10 +68,12 @@ struct Game { Position enPassant; bool canEnpassant = false; GameState state = TURN; - std::unordered_map ThreeFoldMap; + std::vector history; std::unordered_map *Transpositions = nullptr; }; +bool isRepetionDraw(uint64_t key, Game *g); + struct Undo { Piece movedPiece; Piece capturedPiece; -- cgit v1.2.3