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

Refactoring code #908

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Refactoring code #908

wants to merge 5 commits into from

Conversation

Qinyue-W
Copy link

Extract method

  • Package: featurecat.lizzie.analysis
  • File: Leelaz.java
  • Method: private void parseLine(String line)
  • Line number: 321

Rename variable

  • Package: featurecat.lizzie.theme
  • File: Theme.java
  • Method: private BufferedImage getImageByKey(String key, String defaultValue, String defaultImg)
  • Line number: 281, 283, 286, 287, 290, 291

Extract class

  • Package: featurecat.lizzie.gui
  • File: Menu.java
  • New file: UpdateEngine.java
  • Methods: public void updateEngineMenu(List engineList)
    public void updateEngineIcon(List engineList, int currentEngineNo)
  • Line number in Menu.java: 1377
  • Line number in UpdateEngine.java: 16, 40

Replace conditional with polymorphism

  • Package: featurecat.lizzie.gui
  • File: BoardRenderer.java
  • New files: BranchFactory.java, BranchMove.java, DefaultBoard.java, ShowNormalBoard.java, ShowRawBoard.java
  • Method in BoardRender.java: private int maxBranchMoves()
  • Line number in BoardRender.java: 1692

Change bidirectional association to unidirectional association

  • Package: featurecat.lizzie.rules
  • File: BoardData.java
  • Method: public double getScoreMean()
  • Line number: 213
  • Package: featurecat.lizzie.util
  • File: Utils.java
  • Method: public static double actualScoreMean(double scoreMean)
  • Line number: 166

@kaorahi kaorahi mentioned this pull request May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant