diff --git a/src/main/java/featurecat/lizzie/gui/LizzieFrame.java b/src/main/java/featurecat/lizzie/gui/LizzieFrame.java index 82c298f0c..66837cb0f 100644 --- a/src/main/java/featurecat/lizzie/gui/LizzieFrame.java +++ b/src/main/java/featurecat/lizzie/gui/LizzieFrame.java @@ -911,6 +911,7 @@ private void drawMoveStatistics(Graphics2D g, int posX, int posY, int width, int Leelaz.WinrateStats stats = Lizzie.leelaz.getWinrateStats(); double curWR = stats.maxWinrate; // winrate on this move boolean validWinrate = (stats.totalPlayouts > 0); // and whether it was actually calculated + boolean validScore = validWinrate; if (!validWinrate) { curWR = Lizzie.board.getHistory().getData().winrate; validWinrate = Lizzie.board.getHistory().getData().getPlayouts() > 0; @@ -964,7 +965,7 @@ private void drawMoveStatistics(Graphics2D g, int posX, int posY, int width, int setPanelFont(g, (int) (min(width, height) * 0.2)); String text = ""; - if (Lizzie.leelaz.isKataGo) { + if (Lizzie.leelaz.isKataGo && validScore) { double score = Lizzie.leelaz.scoreMean; if (Lizzie.board.getHistory().isBlacksTurn()) { if (Lizzie.config.showKataGoBoardScoreMean) { diff --git a/src/main/java/featurecat/lizzie/gui/WinratePane.java b/src/main/java/featurecat/lizzie/gui/WinratePane.java index a54bb4ac2..c25759a63 100644 --- a/src/main/java/featurecat/lizzie/gui/WinratePane.java +++ b/src/main/java/featurecat/lizzie/gui/WinratePane.java @@ -123,6 +123,7 @@ private void drawMoveStatistics(Graphics2D g, int posX, int posY, int width, int Leelaz.WinrateStats stats = Lizzie.leelaz.getWinrateStats(); double curWR = stats.maxWinrate; // winrate on this move boolean validWinrate = (stats.totalPlayouts > 0); // and whether it was actually calculated + boolean validScore = validWinrate; if (!validWinrate) { // ref. drawMoveStatistics() in LizzieFrame.java curWR = Lizzie.board.getHistory().getData().winrate; @@ -177,7 +178,7 @@ private void drawMoveStatistics(Graphics2D g, int posX, int posY, int width, int setPanelFont(g, (int) (min(width, height) * 0.2)); String text = ""; - if (Lizzie.leelaz.isKataGo) { + if (Lizzie.leelaz.isKataGo && validScore) { double score = Lizzie.leelaz.scoreMean; if (Lizzie.board.getHistory().isBlacksTurn()) { if (Lizzie.config.showKataGoBoardScoreMean) {