From 6a39e28205d44e96da72728c0a3d4d6468962539 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 10 Aug 2026 15:04:16 +0200 Subject: adding json based perft tests --- src/uci.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'src/uci.cpp') diff --git a/src/uci.cpp b/src/uci.cpp index 0805c6c..1854019 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -286,31 +286,6 @@ void Uci() { MakeMove(move, &game); } - } else if (cmd.starts_with("perft")) { - std::istringstream iss(cmd); - - std::string word; - int depth = -1; - - if (!(iss >> word >> depth) || word != "perft" || depth < 0) { - cout << "info string usage: perft \n"; - cout.flush(); - continue; - } - - auto start = std::chrono::steady_clock::now(); - - uint64_t count = MoveGenTest(depth, &game); - - auto end = std::chrono::steady_clock::now(); - auto ms = - std::chrono::duration_cast(end - start) - .count(); - std::ostringstream oss; - oss << "{\"ms\": " << ms << ", \"result\": " << count << "}"; - std::string json = oss.str(); - - std::cout << json << std::endl; } } } -- cgit v1.2.3