diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/uci.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/uci.cpp b/src/uci.cpp index e6aec4e..dc595b5 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -103,7 +103,6 @@ void Uci() { Game game = initBoard("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", &transpositions); - LoadTable("cache/positions.txt", &transpositions); string line; while (getline(cin, line)) { @@ -114,6 +113,16 @@ void Uci() { if (cmd == "quit") { break; } + if (cmd == "save") { + SaveTranspositionTable(transpositions); + cout << "done\n"; + cout.flush(); + } + if (cmd == "load") { + LoadTable("cache/positions.txt", &transpositions); + cout << "done\n"; + cout.flush(); + } if (cmd == "uci") { cout << "uciok\n"; cout.flush(); @@ -166,7 +175,6 @@ void Uci() { } cout << "\n"; - SaveTranspositionTable(transpositions); cout.flush(); } else if (cmd.starts_with("position")) { stringstream ss(line); |
