|
@@ -75,11 +75,6 @@ bool Game::parseLine(const String& line) {
|
|
|
line == "************************Player 2 won!**********************") {
|
|
|
|
|
|
std::cerr << line << "\n";
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
std::cerr << turns << "," << moves << "," << selectionTime << "," << moveTime << "\n";
|
|
|
return true;
|
|
|
}
|
|
@@ -193,7 +188,7 @@ uint Game::move(const Vector& from, const Vector& to) {
|
|
|
direction = to - from;
|
|
|
|
|
|
lastLocations.add(from);
|
|
|
-
|
|
|
+
|
|
|
fields.setState(to, fields.getState(from));
|
|
|
fields.setState(from, Fields::EMPTY);
|
|
|
|
|
@@ -347,6 +342,7 @@ bool Game::isTakingPossible() const {
|
|
|
|
|
|
for(Vector& m : neighbours) {
|
|
|
Vector from = to + m;
|
|
|
+
|
|
|
if(!isInRange(from) || !areNeighbors(from, to) || !fields.hasState(from, Fields::WHITE)) {
|
|
|
continue;
|
|
|
}
|
|
@@ -385,4 +381,4 @@ uint Game::getBestEnemyRank() const {
|
|
|
|
|
|
long int Game::getNanos() {
|
|
|
return std::chrono::high_resolution_clock::now().time_since_epoch().count();
|
|
|
-}
|
|
|
+}
|