Skip to content

Conversation

@Apricot-S
Copy link
Collaborator

This PR deprecates the public attributes Shanten.number_characters and Shanten.number_isolated_tiles.

  • Both attributes were previously exposed as public fields but actually represent internal state used during backtracking.

  • Accessing them now triggers a DeprecationWarning with the message:

    "`<name>` is deprecated. This attribute reflects internal state and should not be used."
  • No setter is provided; attempts to assign to these attributes will raise AttributeError.

  • In addition, following the proposal in Shanten.number_characters and Shanten.number_isolated_tiles Have Inappropriate Names #57, the internal fields have been renamed to more accurate identifiers (_flag_four_copies and _flag_isolated_tiles) to avoid confusion with tile categories or counts.

Benefits of this change

fix #57

@Apricot-S Apricot-S requested a review from Nihisil October 10, 2025 21:45
Copy link
Contributor

@Nihisil Nihisil left a comment

Choose a reason for hiding this comment

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

Thank you for this fix

@Nihisil Nihisil merged commit b209c5e into MahjongRepository:master Oct 11, 2025
9 checks passed
@Apricot-S Apricot-S deleted the feat/shanten-field branch October 11, 2025 07:29
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.

Shanten.number_characters and Shanten.number_isolated_tiles Have Inappropriate Names

2 participants