-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
58 lines (41 loc) · 911 Bytes
/
main.cpp
File metadata and controls
58 lines (41 loc) · 911 Bytes
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
/* *****
* File: main.cpp
* Author: Cosmin
*
* Created on March 10, 2010, 8:46 PM
*/
#include <stdio.h>
#include "ChessBoard.h"
#include "stuff.h"
#include "Tools.h"
#include "Xboard.h"
#include "Game.h"
#include "Mind.h"
#include "MoveTree.h"
#include <signal.h>
#include <ctime>
#include <cstdlib> //pentru rand()
Xboard xboard;
Game joc;
Mind mind;
extern FILE* debug_file;
int main(int argc, char** argv)
{
//signal handling SIGINT
//daca nu e analizat crashuieste programul
//ignora SIGINT altfel crasuieste dupa prima mutare a engine-ului
signal(SIGINT,SIG_IGN);
srand((unsigned)time(0));
// debug_file=fopen("test.txt","w");
// ChessBoard testBoard;
// testBoard.InitializePieces();
//
// MoveTree tree;
// tree.MakeTree(testBoard,3);
//
// return 0;
//Initializam clasa de comunicare cu XBoard
xboard.initialize();
//Incepe jocul
joc.play();
}