Skip to content

Comments

add black to play behavior to task_preview_tile#196

Open
Cidragon wants to merge 225 commits intoale64bit:mainfrom
Cidragon:issue-195
Open

add black to play behavior to task_preview_tile#196
Cidragon wants to merge 225 commits intoale64bit:mainfrom
Cidragon:issue-195

Conversation

@Cidragon
Copy link
Contributor

fix #195

The code only does 2 simple things:

  • It remove and if/else statement to just make it an if by using taskData variable as a starting point to check if the snapshot data is null or not.
  • set task value depending if the settings include always black to play.

ale64bit and others added 30 commits July 2, 2025 13:58
);
}

final task = context.settings.alwaysBlackToPlay == true &&
Copy link
Owner

Choose a reason for hiding this comment

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

can't we simplify this condition?

final task = context.settings.alwaysBlackToPlay 
              ? taskData.withBlackToPlay()
              : taskData;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, the function withBlackToPlay does check if the first to move is black to play so it's not necessary to check it previously.

I can remove the second condition if you want, the only problem is that i don't know what should I do now that the pull request doesn't follow the main branch anymore. do I need to sync first and then commit later?

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.

Add black to play consistency to "my mistakes" page and single problems

10 participants