Skip to content

Conversation

@yl25946
Copy link
Contributor

@yl25946 yl25946 commented Jul 9, 2024

In probcut move loop, everything is enclosed within a large if statement. I've changed it to guard clauses to stay consistent with other move loops.

@yl25946 yl25946 closed this Jul 9, 2024
@yl25946 yl25946 reopened this Jul 9, 2024
{
assert(move.is_ok());

if (move == excludedMove)
Copy link
Member

Choose a reason for hiding this comment

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

join those two if statements, no need for comment

Copy link

Choose a reason for hiding this comment

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

    if (move == excludedMove || !pos.legal(move))
      continue;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But in the other move loop, these two if statements are separated, and all the other legality checks have a comment on them, so I feel that this way is more consistent?

@vondele vondele added simplification to be merged Will be merged shortly labels Jul 9, 2024
@vondele vondele closed this in 362a77a Jul 9, 2024
yl25946 added a commit to yl25946/Stockfish that referenced this pull request Jul 9, 2024
In probcut move loop, everything is enclosed within a large if statement. I've
changed it to guard clauses to stay consistent with other move loops.

closes official-stockfish#5463

No functional change
linrock pushed a commit to linrock/Stockfish that referenced this pull request Jul 9, 2024
In probcut move loop, everything is enclosed within a large if statement. I've
changed it to guard clauses to stay consistent with other move loops.

closes official-stockfish#5463

No functional change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

simplification to be merged Will be merged shortly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants