aboutsummaryrefslogtreecommitdiff
path: root/src/board/board.hpp
diff options
context:
space:
mode:
authorAdam <adammegarules1@gmail.com>2026-08-16 11:22:34 +0200
committerAdam <adammegarules1@gmail.com>2026-08-16 11:22:34 +0200
commit8e47b8f9f8a017f25a1c9a9baba05b0bf9b12d2d (patch)
tree6ee118919928e33d4115d78a6565940f26c8b30c /src/board/board.hpp
parentb0ed5c409f822fa120ef2e2c830842204b0945c1 (diff)
perf(draw) instead of having a hash map for three fold repetion check now we have
Diffstat (limited to 'src/board/board.hpp')
-rw-r--r--src/board/board.hpp5
1 files changed, 4 insertions, 1 deletions
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 <cstdint>
#include <unordered_map>
+#include <vector>
enum PieceType : std::uint8_t {
NONEPIECE,
@@ -67,10 +68,12 @@ struct Game {
Position enPassant;
bool canEnpassant = false;
GameState state = TURN;
- std::unordered_map<uint64_t, int> ThreeFoldMap;
+ std::vector<uint64_t> history;
std::unordered_map<uint64_t, TranspositionsEntry> *Transpositions = nullptr;
};
+bool isRepetionDraw(uint64_t key, Game *g);
+
struct Undo {
Piece movedPiece;
Piece capturedPiece;