From 3f7a97e953c0c2a49a27b1c9c421878a8b4fd787 Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Mon, 8 Jul 2019 09:08:10 +0200 Subject: [PATCH] Fixed some typos --- src/dev/kske/chess/game/AIPlayer.java | 4 ++-- src/dev/kske/chess/game/Game.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dev/kske/chess/game/AIPlayer.java b/src/dev/kske/chess/game/AIPlayer.java index 75ad70d..fa15216 100644 --- a/src/dev/kske/chess/game/AIPlayer.java +++ b/src/dev/kske/chess/game/AIPlayer.java @@ -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; diff --git a/src/dev/kske/chess/game/Game.java b/src/dev/kske/chess/game/Game.java index 9953e23..5c2f5f2 100644 --- a/src/dev/kske/chess/game/Game.java +++ b/src/dev/kske/chess/game/Game.java @@ -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();