-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathconsole_ui.cpp
More file actions
46 lines (41 loc) · 1.75 KB
/
console_ui.cpp
File metadata and controls
46 lines (41 loc) · 1.75 KB
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
#include "stdafx.h"
void printWelcome() {
printf(" CPW chess engine ");
printf( VERSION_STRING );
printf( "\n");
printf( COMPILE_STRING );
printf("\n");
printf(" created by some members of Chessprogramming Wiki \n");
printf(" http://chessprogramming.wikispaces.com/ \n\n");
printf(" type 'help' for a list of commands \n\n");
}
void printHelp() {
printf("------------------------------------------ \n");
printf("d = display current board position \n");
printf("bench n = test search speed to depth n \n");
printf("perft n = test perft numbers up to depth n \n");
printf("eval = display evaluation details \n");
printf("stat = display search statistics \n");
printf("go = play for the side to move \n");
printf("new = start a new game \n");
printf("sd n = set search depth to n plies \n");
printf("st n = set search time to n seconds \n");
printf("quit = exit CPW engine \n");
printf("\n");
printf("Please enter moves in algebraic notation (e2e4 d7d5 e4d5 d8d5 ... b7b8q) \n");
printf("or better use a GUI compliant with the UCI protocol \n");
printf("------------------------------------------ \n");
}
void printStats() {
U64 nodes = sd.nodes + (sd.nodes == 0);
printf("-----------------------------\n");
printf("Nodes : %llu \n", sd.nodes);
printf("Quiesc nodes: %llu \n", sd.q_nodes);
printf("Ratio : %llu %\n", sd.q_nodes * 100 / nodes);
printf("-----------------------------\n");
}
void printSearchHeader() {
printf("-------------------------------------------------------\n");
printf( "ply nodes time score pv\n");
printf("-------------------------------------------------------\n");
}