diff options
Diffstat (limited to 'src/uci.cpp')
| -rw-r--r-- | src/uci.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/uci.cpp b/src/uci.cpp index ff8bc33..b78ffea 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -66,20 +66,20 @@ uint16_t UciToMove(const std::string &uci) { Game initBoard( const std::string &startingFEN, std::unordered_map<uint64_t, TranspositionsEntry> *transPositions) { - Game b{}; - b.enPassant = IndexToPosition(0); // default value - b.canEnpassant = false; - b.state = TURN; - b.turn = true; - b.halfMoveClock = 0; - b.MoveClock = 0; - b.Transpositions = transPositions; - - setBoardFen(startingFEN, &b); - - uint64_t key = GenerateZobristKey(&b); - b.ThreeFoldMap[key] = 1; - return b; + Game g{}; + g.enPassant = IndexToPosition(0); // default value + g.canEnpassant = false; + g.state = TURN; + g.turn = true; + g.halfMoveClock = 0; + g.MoveClock = 0; + g.Transpositions = transPositions; + + setBoardFen(startingFEN, &g); + + uint64_t key = GenerateZobristKey(&g); + g.history.push_back(key); + return g; }; static void PrintBitboard(uint64_t bb, const std::string &name) { std::cout << name << "\n"; |
