-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
executable file
·60 lines (48 loc) · 1.39 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/**********************************************************************
|
| Bogart
| Chess Engine
|
| Copyright (C) 2009-2013 Dr.Kameleon
|
|**********************************************************************
| main.cpp
|**********************************************************************/
#include "bogart.h"
//=======================================================
// Global Variables
//=======================================================
BOOL DEBUG;
BOOL UCI;
//=======================================================
// Where all the magic begins...
//=======================================================
int main(int argc, char *argv[])
{
cout << BOGART_VERSION << " - By " << BOGART_AUTHOR << endl;
ParseResult pr = Cmdline::parseArgs(argc,argv);
DEBUG = pr.verbose;
UCI = (pr.cmd=="engine");
if (pr.cmd=="help") return 1;
else
{
Init::all();
if ((pr.cmd=="console")||(pr.cmd=="engine"))
{
Engine* eng = new Engine();
eng->ignite();
}
else
{
Benchmark* bench = new Benchmark(new Board(pr.fen));
if (pr.cmd=="perft") bench->perft(pr.depth,pr.loop);
else if (pr.cmd=="eval") bench->eval(pr.depth,pr.loop);
else if (pr.cmd=="generate") bench->generate();
}
}
return 0;
}
//=======================================================
// This is the end,...
// ...my only friend the end...
//=======================================================