I have the following code:
game.log.fine(\"HERE\" + bestMove.get(\"score\"));
Integer bestScore = Integer.getInteger(bestMove.get(\"score\"));
game.log.fine(
You should use
Integer.parseInt
in your code since
Integer.getInteger
will determine the integer value of the system property with the specified name.
Correct code would be:
Integer bestScore = Integer.parseInt(bestMove.get("score"), 10);
That 10 as the second arguments is the radix. Use it always so your number won't be parsed ambigously.