Skip to content

Commit

Permalink
Merge #730
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/java/featurecat/lizzie/gui/WinratePane.java
  • Loading branch information
Hiraoka committed Sep 28, 2020
2 parents f18b651 + e0a49d4 commit dc8f872
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/featurecat/lizzie/gui/LizzieFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/featurecat/lizzie/gui/WinratePane.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ private void drawMoveStatistics(Graphics2D g, int posX, int posY, int width, int
curWR = Lizzie.board.getHistory().getData().winrate;
validWinrate = Lizzie.board.getHistory().getData().getPlayouts() > 0;
}
boolean validScore = validWinrate;
if (Lizzie.frame.isPlayingAgainstLeelaz
&& Lizzie.frame.playerIsBlack == !Lizzie.board.getHistory().getData().blackToPlay) {
validWinrate = false;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit dc8f872

Please sign in to comment.