diff --git a/src/model/Board.java b/src/model/Board.java index c9fe897..ece0f1b 100755 --- a/src/model/Board.java +++ b/src/model/Board.java @@ -397,9 +397,9 @@ public class Board { public int pieceDifferentialHeuristic(Color color) { int blackHeuristic = blackPieces + blackKings; int whiteHeuristic = whitePieces + whiteKings; - return - (color == Color.BLACK ? + return (color == Color.BLACK ? (blackHeuristic - whiteHeuristic) : - (whiteHeuristic - blackHeuristic)); + (whiteHeuristic)); } public Location samuelMapping(int k) { diff --git a/src/player/ComputerPlayer.java b/src/player/ComputerPlayer.java index 9f82b94..b2de44c 100644 --- a/src/player/ComputerPlayer.java +++ b/src/player/ComputerPlayer.java @@ -94,11 +94,10 @@ public class ComputerPlayer extends Player { if (depth == 0) { return b.getHeuristic(otherColor); } - + if (inJumpSequence) { /* Generate the frontier only for the piece that just moved */ boardFrontier = b.generateJumpFrontierForPiece(b.getLastPieceMoved()); - /* If we can't jump anymore, get out of the jump sequence */ if (boardFrontier.isEmpty()) { return getMinimaxScore(otherColor, b, depth-1, inJumpSequence);