Fixed some typos

This commit is contained in:
Kai S. K. Engelbart 2019-07-08 09:08:10 +02:00
parent a3125188c1
commit 0a8a8d481a
2 changed files with 4 additions and 4 deletions

View File

@ -27,7 +27,7 @@ public class AIPlayer extends Player {
new Thread(() -> {
count = 0;
findBestMove((Board) board.clone(), color, 0);
System.out.println("Moved processes: " + count);
System.out.println("Moves processed: " + count);
SwingUtilities.invokeLater(() -> game.onMove(this, bestMove));
}).start();
}
@ -41,7 +41,7 @@ public class AIPlayer extends Player {
int enemyValue = board.evaluate(color.opposite());
int valueChange = teamValue - enemyValue;
if (depth <= 3 && valueChange >= 0) valueChange -= findBestMove(board, color.opposite(), depth + 1);
if (depth < 4) valueChange -= findBestMove(board, color.opposite(), depth + 1);
if (valueChange > bestValue) {
bestValue = valueChange;

View File

@ -40,10 +40,10 @@ public class Game {
switch (eventType) {
case CHECKMATE:
case STALEMATE:
System.out.printf("%s in %s!%n", player.color, eventType);
System.out.printf("%s in %s!%n", player.color.opposite(), eventType);
break;
case CHECK:
System.out.printf("%s in check!%n", player.color);
System.out.printf("%s in check!%n", player.color.opposite());
default:
boardPanel.repaint();
players.get(player.color.opposite()).requestMove();