Skip to content

Commit

Permalink
Fix: D key was broken after 4f460f8 (ref. featurecat#852)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiraoka committed Jan 30, 2021
1 parent ebeb446 commit 042ada0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
6 changes: 0 additions & 6 deletions src/main/java/featurecat/lizzie/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ public class Config {
public double minPlayoutRatioForStats = 0.1;
public boolean showLcbWinrate = false;

public boolean showKataGoScoreMean = true;
public boolean showKataGoBoardScoreMean = false;
public boolean kataGoScoreMeanAlwaysBlack = false;
public boolean kataGoNotShowWinrate = false;
public boolean showKataGoEstimate = false;
public boolean showKataGoEstimateOnSubboard = true;
public boolean showKataGoEstimateOnMainboard = true;
Expand Down Expand Up @@ -236,10 +234,8 @@ public Config() throws IOException {
shadowSize = theme.shadowSize();
showLcbWinrate = config.getJSONObject("leelaz").optBoolean("show-lcb-winrate");

showKataGoScoreMean = uiConfig.optBoolean("show-katago-scoremean", true);
showKataGoBoardScoreMean = uiConfig.optBoolean("show-katago-boardscoremean", false);
kataGoScoreMeanAlwaysBlack = uiConfig.optBoolean("katago-scoremean-alwaysblack", false);
kataGoNotShowWinrate = uiConfig.optBoolean("katago-notshow-winrate", false);
showKataGoEstimate = uiConfig.optBoolean("show-katago-estimate", false);
showKataGoEstimateOnSubboard = uiConfig.optBoolean("show-katago-estimate-onsubboard", true);
showKataGoEstimateOnMainboard = uiConfig.optBoolean("show-katago-estimate-onmainboard", true);
Expand Down Expand Up @@ -547,10 +543,8 @@ private JSONObject createDefaultConfig() {
ui.put("replay-branch-interval-seconds", 1.0);
ui.put("gtp-console-style", defaultGtpConsoleStyle);
ui.put("panel-ui", false);
ui.put("show-katago-scoremean", true);
ui.put("show-katago-boardscoremean", false);
ui.put("katago-scoremean-alwaysblack", false);
ui.put("katago-notshow-winrate", false);
ui.put("show-katago-estimate", false);
ui.put("show-katago-estimate-onsubboard", true);
ui.put("show-katago-estimate-onmainboard", true);
Expand Down
22 changes: 9 additions & 13 deletions src/main/java/featurecat/lizzie/gui/Input.java
Original file line number Diff line number Diff line change
Expand Up @@ -470,23 +470,19 @@ public void keyPressed(KeyEvent e) {
break;

case VK_D:
if (Lizzie.leelaz.isKataGo) {
if (Lizzie.config.showKataGoScoreMean && Lizzie.config.kataGoNotShowWinrate) {
Lizzie.config.showKataGoScoreMean = false;
Lizzie.config.kataGoNotShowWinrate = false;
break;
}
if (Lizzie.config.showKataGoScoreMean && !Lizzie.config.kataGoNotShowWinrate) {
Lizzie.config.kataGoNotShowWinrate = true;
if (Lizzie.leelaz.supportScoremean()) {
if (Lizzie.config.showScoremeanInSuggestion && !Lizzie.config.showWinrateInSuggestion) {
Lizzie.config.showScoremeanInSuggestion = false;
Lizzie.config.showWinrateInSuggestion = true;
break;
}
if (Lizzie.config.showKataGoScoreMean) {
Lizzie.config.showKataGoScoreMean = false;
if (Lizzie.config.showScoremeanInSuggestion && Lizzie.config.showWinrateInSuggestion) {
Lizzie.config.showWinrateInSuggestion = false;
break;
}
if (!Lizzie.config.showKataGoScoreMean) {
Lizzie.config.showKataGoScoreMean = true;
Lizzie.config.kataGoNotShowWinrate = false;
if (!Lizzie.config.showScoremeanInSuggestion) {
Lizzie.config.showScoremeanInSuggestion = true;
Lizzie.config.showWinrateInSuggestion = true;
}
} else {
toggleShowDynamicKomi();
Expand Down

0 comments on commit 042ada0

Please sign in to comment.