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

Introduce SudokuType sealed class #51

Merged
merged 3 commits into from
Feb 21, 2024

Conversation

teogor
Copy link
Owner

@teogor teogor commented Feb 21, 2024

This pull request introduces a new SudokuType sealed class and deprecates the old GameType enum. The new SudokuType offers several advantages:

Here's a detailed breakdown of the changes:

  • Improved organization: SudokuType groups size information in a single class, providing better clarity and structure.
  • Flexibility: The sealed class design allows for easy addition of new Sudoku sizes in the future.
  • Clearer properties: Names and properties in SudokuType directly reflect size information, improving readability.
  • Deprecation of GameType: It is marked with @Deprecated and recommended replacement with SudokuType.

Here are some specific examples of code changes:

// Before (using deprecated `GameType`)
val gameType = GameType.SixDigits // Represents a 6x6 Sudoku

// After (using new `SudokuType`)
val sudokuType = SudokuType.Sudoku6x6 // Explicit representation
For more, please view the docs: source.teogor.dev/sudoklify/sudoku-type

@teogor teogor added @priority-medium @feature New feature or request labels Feb 21, 2024
@teogor teogor added this to the 1.0.0-beta01 milestone Feb 21, 2024
@teogor teogor self-assigned this Feb 21, 2024
@teogor teogor merged commit 852449a into main Feb 21, 2024
4 checks passed
@zeobot zeobot bot deleted the refactor/deprecated-gametype-to-sudokutype branch February 21, 2024 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@feature New feature or request @priority-medium
Projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant