-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_moves.cpp
More file actions
41 lines (33 loc) · 980 Bytes
/
Copy pathtest_moves.cpp
File metadata and controls
41 lines (33 loc) · 980 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
#define DEBUG_MODE
#include <array>
#include <fstream>
#include <iostream>
#include <vector>
#include "headers/system.hpp"
#include "headers/rng.hpp"
#include "chess/chess.hpp"
using namespace std;
using namespace chess;
//MAIN
int main() {
cout << "START PROGRAM" << endl;
rng_init(time(NULL));
ChessBoard board;
ifstream sample_in("chess/test_data/move_correctness/test1.txt");
assert(sample_in.is_open() && "Sample input file failed to open.");
while (!sample_in.eof()) {
board.clear(); // reset board before input
sample_in >> board;
bool white_turn = true;
cout << "FINISH SETUP" << endl;
board.print_board();
board.print_pcs();
cout << "White moves:\n";
board.print_all_moves(true);
cout << "Black moves:\n";
board.print_all_moves(false);
move_score_t best_mps = board.get_best_move(white_turn, 5);
cout << best_mps << '\n';
}
return 0;
}