Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always show statistics for blue-ringed moves. #294

Merged
merged 1 commit into from
Jun 11, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/main/java/featurecat/lizzie/gui/BoardRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand All @@ -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;
Expand Down