Move struct RootMove to Search namespace

And directly pass RootMoves instead of SearchMoves
to main thread. A class declaration is better suited
in a header and slims a bit the fatty search.cpp

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2012-01-14 13:49:25 +01:00
parent a29dd88f75
commit 103b368ab7
5 changed files with 113 additions and 125 deletions

View File

@@ -19,7 +19,6 @@
#include <fstream>
#include <iostream>
#include <set>
#include <vector>
#include "misc.h"
@@ -29,7 +28,6 @@
#include "ucioption.h"
using namespace std;
using namespace Search;
static const char* Defaults[] = {
"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
@@ -62,7 +60,7 @@ static const char* Defaults[] = {
void benchmark(int argc, char* argv[]) {
vector<string> fens;
LimitsType limits;
Search::LimitsType limits;
int time;
int64_t nodes = 0;
@@ -116,14 +114,14 @@ void benchmark(int argc, char* argv[]) {
if (valType == "perft")
{
int64_t cnt = perft(pos, limits.maxDepth * ONE_PLY);
int64_t cnt = Search::perft(pos, limits.maxDepth * ONE_PLY);
cerr << "\nPerft " << limits.maxDepth << " leaf nodes: " << cnt << endl;
nodes += cnt;
}
else
{
Threads.start_thinking(pos, limits, set<Move>(), false);
nodes += RootPosition.nodes_searched();
Threads.start_thinking(pos, limits);
nodes += Search::RootPosition.nodes_searched();
}
}