From 66699dc7be74921ffd12e32717fbe8c7e8b74cba Mon Sep 17 00:00:00 2001 From: zsalch Date: Sat, 12 Oct 2019 16:57:50 +0800 Subject: [PATCH] Format the source --- src/main/java/featurecat/lizzie/Config.java | 4 +- src/main/java/featurecat/lizzie/gui/Menu.java | 54 +++++++++---------- .../featurecat/lizzie/gui/OnlineDialog.java | 8 +-- 3 files changed, 34 insertions(+), 32 deletions(-) diff --git a/src/main/java/featurecat/lizzie/Config.java b/src/main/java/featurecat/lizzie/Config.java index eacc9b3e2..cca15fc0d 100644 --- a/src/main/java/featurecat/lizzie/Config.java +++ b/src/main/java/featurecat/lizzie/Config.java @@ -467,7 +467,9 @@ private JSONObject createDefaultConfig() { // About engine parameter JSONObject leelaz = new JSONObject(); - leelaz.put("_comment", "note, network-file is obselete in Lizzie 0.7+, ignore network-file, kept for compatibility"); + leelaz.put( + "_comment", + "note, network-file is obselete in Lizzie 0.7+, ignore network-file, kept for compatibility"); leelaz.put("network-file", "lznetwork.gz"); if (this.macAppBundle) { // Mac Apps don't really expect the user to modify the current working directory, since that diff --git a/src/main/java/featurecat/lizzie/gui/Menu.java b/src/main/java/featurecat/lizzie/gui/Menu.java index c3e0f23bc..47f96bc8e 100644 --- a/src/main/java/featurecat/lizzie/gui/Menu.java +++ b/src/main/java/featurecat/lizzie/gui/Menu.java @@ -778,8 +778,8 @@ public void actionPerformed(ActionEvent e) { new JCheckBoxMenuItem(resourceBundle.getString("Menu.view.kataGo.kataEstimate.mode.small")); final JCheckBoxMenuItem kataEstimateModeSmallAndDead = - new JCheckBoxMenuItem( - resourceBundle.getString("Menu.view.kataGo.kataEstimate.mode.smallAndDead")); + new JCheckBoxMenuItem( + resourceBundle.getString("Menu.view.kataGo.kataEstimate.mode.smallAndDead")); final JCheckBoxMenuItem kataEstimateModeLargeAndSmall = new JCheckBoxMenuItem( @@ -836,24 +836,23 @@ public void actionPerformed(ActionEvent e) { } }); - kataEstimateModeSmallAndDead.addActionListener( - new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - Lizzie.config.kataGoEstimateMode = "small+dead"; - Lizzie.frame.removeEstimateRect(); - Lizzie.leelaz.ponder(); - Lizzie.config.uiConfig.put("katago-estimate-mode", Lizzie.config.kataGoEstimateMode); - try { - Lizzie.config.save(); - } catch (IOException es) { - // TODO Auto-generated catch block - } - } - }); - + kataEstimateModeSmallAndDead.addActionListener( + new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + Lizzie.config.kataGoEstimateMode = "small+dead"; + Lizzie.frame.removeEstimateRect(); + Lizzie.leelaz.ponder(); + Lizzie.config.uiConfig.put("katago-estimate-mode", Lizzie.config.kataGoEstimateMode); + try { + Lizzie.config.save(); + } catch (IOException es) { + // TODO Auto-generated catch block + } + } + }); - kataEstimateModeLargeAndSmall.addActionListener( + kataEstimateModeLargeAndSmall.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -952,7 +951,8 @@ public void menuSelected(MenuEvent e) { } kataEstimateModeLarge.setState(Lizzie.config.kataGoEstimateMode.equals("large")); kataEstimateModeSmall.setState(Lizzie.config.kataGoEstimateMode.equals("small")); - kataEstimateModeSmallAndDead.setState(Lizzie.config.kataGoEstimateMode.equals("small+dead")); + kataEstimateModeSmallAndDead.setState( + Lizzie.config.kataGoEstimateMode.equals("small+dead")); kataEstimateModeLargeAndSmall.setState( Lizzie.config.kataGoEstimateMode.equals("large+small")); kataEstimateModeLargeAndDead.setState( @@ -1235,14 +1235,14 @@ public void actionPerformed(ActionEvent e) { analyzeMenu.add(toggleAnalyze); final JMenuItem clearAnalysis = - new JMenuItem(resourceBundle.getString("Menu.analyze.clearAnalysis")); + new JMenuItem(resourceBundle.getString("Menu.analyze.clearAnalysis")); clearAnalysis.addActionListener( - new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - Lizzie.board.clearAnalysis(); - } - }); + new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + Lizzie.board.clearAnalysis(); + } + }); analyzeMenu.add(clearAnalysis); final JMenuItem autoAnalyze = diff --git a/src/main/java/featurecat/lizzie/gui/OnlineDialog.java b/src/main/java/featurecat/lizzie/gui/OnlineDialog.java index 24b0b15ab..c1a93035e 100644 --- a/src/main/java/featurecat/lizzie/gui/OnlineDialog.java +++ b/src/main/java/featurecat/lizzie/gui/OnlineDialog.java @@ -106,10 +106,10 @@ public class OnlineDialog extends JDialog { 115 }; private byte[] b3 = { - 104, 116, 116, 112, 115, 58, 47, 47, 119, 101, 105, 113, 105, 46, 113, 113, 46, 99, 111, 109, 47, - 111, 112, 101, 110, 113, 105, 112, 117, 47, 103, 101, 116, 113, 105, 112, 117, 63, 99, 97, 108, - 108, 98, 97, 99, 107, 61, 106, 81, 117, 101, 114, 121, 49, 38, 103, 97, 109, 101, 99, 111, 100, - 101, 61 + 104, 116, 116, 112, 115, 58, 47, 47, 119, 101, 105, 113, 105, 46, 113, 113, 46, 99, 111, 109, + 47, 111, 112, 101, 110, 113, 105, 112, 117, 47, 103, 101, 116, 113, 105, 112, 117, 63, 99, 97, + 108, 108, 98, 97, 99, 107, 61, 106, 81, 117, 101, 114, 121, 49, 38, 103, 97, 109, 101, 99, 111, + 100, 101, 61 }; private byte[] c1 = { 104, 116, 116, 112, 115, 58, 47, 47, 114, 116, 103, 97, 109, 101, 46, 121, 105, 107, 101, 119,