From 1c12974d79c953cfb5bedc16b41e4868a4114c56 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Sun, 28 Feb 2021 20:41:01 +0100 Subject: [PATCH] fixed getScore --- src/othello/State.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() {