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

next: Support Display Only Last Move Number #367

Merged
merged 3 commits into from
Oct 1, 2018

Conversation

zsalch
Copy link
Contributor

@zsalch zsalch commented Sep 18, 2018

The change supports display only last move number that can be specified in the config.txt.
For example, only display last 10 move number:

"ui": {
"only-last-move-number": 10,

image

@@ -469,11 +469,20 @@ private void drawMoveNumbers(Graphics2D g) {

int[] moveNumberList = branch == null ? Lizzie.board.getMoveNumberList() : branch.data.moveNumberList;

// Allow to display only last move number
int lastMoveNumber = Lizzie.board.getData().moveNumber;
int onlyLastMoveNumber = (!Lizzie.config.uiConfig.isNull("only-last-move-number")) ? Lizzie.config.uiConfig.getInt("only-last-move-number") : 9999;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about uiConfig.optInt("only-last-move-number", 9999) instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better method. I have changed and committed.

Copy link
Contributor

@OlivierBlanvillain OlivierBlanvillain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@featurecat featurecat merged commit d7fd4c6 into featurecat:next Oct 1, 2018
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.

3 participants