From bc2ed0e19369d1f60070be59a51c5df26eb8076b Mon Sep 17 00:00:00 2001 From: TFiFiE Date: Fri, 8 Jun 2018 21:25:52 +0200 Subject: [PATCH] Always show statistics for blue-ringed moves. --- src/main/java/featurecat/lizzie/gui/BoardRenderer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/featurecat/lizzie/gui/BoardRenderer.java b/src/main/java/featurecat/lizzie/gui/BoardRenderer.java index 8a85a4e51..0ca3f42fb 100644 --- a/src/main/java/featurecat/lizzie/gui/BoardRenderer.java +++ b/src/main/java/featurecat/lizzie/gui/BoardRenderer.java @@ -535,6 +535,7 @@ private void drawLeelazSuggestions(Graphics2D g) { continue; boolean isBestMove = bestMoves.get(0) == move; + boolean hasMaxWinrate = move.winrate == maxWinrate; if (move.playouts == 0) // this actually can happen continue; @@ -566,7 +567,7 @@ private void drawLeelazSuggestions(Graphics2D g) { if (branch == null || (isBestMove && Lizzie.frame.mouseHoverCoordinate != null && coordinates[0] == Lizzie.frame.mouseHoverCoordinate[0] && coordinates[1] == Lizzie.frame.mouseHoverCoordinate[1])) { int strokeWidth = 1; - if (isBestMove != (move.winrate == maxWinrate)) { + if (isBestMove != hasMaxWinrate) { strokeWidth = 2; g.setColor(isBestMove ? Color.RED : Color.BLUE); g.setStroke(new BasicStroke(strokeWidth)); @@ -578,7 +579,7 @@ private void drawLeelazSuggestions(Graphics2D g) { } - if (branch == null && alpha >= MIN_ALPHA_TO_DISPLAY_TEXT || (Lizzie.frame.mouseHoverCoordinate != null && coordinates[0] == Lizzie.frame.mouseHoverCoordinate[0] && coordinates[1] == Lizzie.frame.mouseHoverCoordinate[1])) { + if (branch == null && (alpha >= MIN_ALPHA_TO_DISPLAY_TEXT || hasMaxWinrate) || (Lizzie.frame.mouseHoverCoordinate != null && coordinates[0] == Lizzie.frame.mouseHoverCoordinate[0] && coordinates[1] == Lizzie.frame.mouseHoverCoordinate[1])) { double roundedWinrate = Math.round(move.winrate * 10) / 10.0; if (uiConfig.getBoolean("win-rate-always-black") && !Lizzie.board.getData().blackToPlay) { roundedWinrate = 100.0 - roundedWinrate;