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

Refactor GameType enum for improved readability and clarity #30

Merged
merged 1 commit into from
Nov 18, 2023

Conversation

teogor
Copy link
Owner

@teogor teogor commented Nov 18, 2023

This pull request refactors the GameType enum to improve its readability and clarity. The following changes were made:

  • Renamed the sectionHeight and sectionWidth parameters to gridHeight and gridWidth, respectively, to better reflect their intended meaning.
  • Added a cells property that returns the total number of cells in the puzzle, making it easier to access this information without having to calculate it manually.
  • Added an isSquare property that returns whether the puzzle is a square, providing a convenient way to check this property.
  • Modified the toString() method to return a string representation of the game type in the format {cells}x{cells}, making it more concise and informative.

These changes make the GameType enum more consistent, easier to understand, and more convenient to use.

@teogor teogor added @enhancement New feature or request @priority-medium labels Nov 18, 2023
@teogor teogor added this to the 1.0.0-alpha04 milestone Nov 18, 2023
@teogor teogor self-assigned this Nov 18, 2023
@teogor teogor merged commit dd85055 into main Nov 18, 2023
4 checks passed
@zeobot zeobot bot deleted the refactor/rename-gametypes branch November 18, 2023 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@enhancement New feature or request @priority-medium
Projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant