Fix AI value system

main
Elnu 2 years ago
parent b4c9ca0105
commit f16448bdf0

@ -56,7 +56,7 @@ public class ChessAI {
Score score = new Score();
board.forEachPiece((coordinate, piece) -> {
if (!piece.black) {
score.add(piece.getValue());
score.add(-piece.getValue());
} else {
score.add(piece.getValue());
}

@ -6,7 +6,7 @@ public class King extends Piece {
}
public int getValue() {
return Integer.MAX_VALUE;
return 12;
}
public ArrayList<BoardCoordinate> getPossibleMoves(BoardCoordinate position, Board board) {