diff --git a/src/othello/State.java b/src/othello/State.java index 126d3ef..d5cfb49 100644 --- a/src/othello/State.java +++ b/src/othello/State.java @@ -72,8 +72,8 @@ public class State { return moves; } - public int getScore(Player player) { - return player == player1 ? (n1/(n1+n2)) : (n2/(n1+n2)); + public float getScore(Player player) { + return player == player1 ? ((float) n1/(n1+n2)) : ((float) n2/(n1+n2)); } public int getN1() {