Skip to content

Commit

Permalink
Apply kataGoScoreMeanAlwaysBlack to the text on the score curve (#808)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiraoka committed Nov 8, 2020
1 parent cd3b40f commit 76ecdab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/featurecat/lizzie/gui/WinrateGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 76ecdab

Please sign in to comment.