aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bot.cpp5
-rw-r--r--src/uci.cpp3
2 files changed, 3 insertions, 5 deletions
diff --git a/src/bot.cpp b/src/bot.cpp
index d0730d8..8b9273e 100644
--- a/src/bot.cpp
+++ b/src/bot.cpp
@@ -4,7 +4,6 @@
#include <algorithm>
#include <cassert>
#include <cmath>
-#include <iostream>
int PAWN_VALUE = 100;
int KNIGHT_VALUE = 200;
@@ -15,8 +14,6 @@ int MATE = 10000;
const int SEARCH_DEPTH = 3;
-int positions_consider = 0;
-
Move EngineGetBestMove(Game *b) {
auto moves = GetLegalMoves(b);
if (moves.size() == 0) {
@@ -43,7 +40,6 @@ Move EngineGetBestMove(Game *b) {
}
}
}
- std::cout << "\nConsider: " << positions_consider << "\n";
return bestMove;
}
float minimax(int depth, Game *b, float alpha, float beta) {
@@ -93,7 +89,6 @@ float minimax(int depth, Game *b, float alpha, float beta) {
}
float EvaluateBoardForWhite(Game *b) {
- positions_consider++;
float score = 0;
bool isStaleMate = false;
diff --git a/src/uci.cpp b/src/uci.cpp
index d436cb1..4825ece 100644
--- a/src/uci.cpp
+++ b/src/uci.cpp
@@ -87,6 +87,9 @@ void Uci() {
if (cmd == "uci") {
cout << "uciok\n";
cout.flush();
+ } else if (cmd == "ucinewgame") {
+ game =
+ initBoard("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1");
} else if (cmd == "isready") {
cout << "readyok\n";
cout.flush();