From 76ecdabbc49f27b8c0f27cc1b51cc2e77d07ab98 Mon Sep 17 00:00:00 2001 From: Hiraoka Date: Sun, 8 Nov 2020 19:24:55 +0900 Subject: [PATCH] Apply kataGoScoreMeanAlwaysBlack to the text on the score curve (#808) --- src/main/java/featurecat/lizzie/gui/WinrateGraph.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/featurecat/lizzie/gui/WinrateGraph.java b/src/main/java/featurecat/lizzie/gui/WinrateGraph.java index 81de097aa..3d1f9442a 100644 --- a/src/main/java/featurecat/lizzie/gui/WinrateGraph.java +++ b/src/main/java/featurecat/lizzie/gui/WinrateGraph.java @@ -300,9 +300,13 @@ public void draw(Graphics2D g, int posx, int posy, int width, int height) { if (curMovenum > 0) { g.setColor(Color.WHITE); Font f = new Font("", Font.BOLD, 15); + int sign = + Lizzie.config.kataGoScoreMeanAlwaysBlack + ? 1 + : Lizzie.board.getHistory().isBlacksTurn() ? 1 : -1; g.setFont(f); g.drawString( - String.format("%.1f", curCurscoreMean), + String.format("%.1f", sign * curCurscoreMean), posx + (curMovenum * width / numMoves) - 2 * DOT_RADIUS, posy + height / 2