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

Add supportsDifficulty function for GameType compatibility #39

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

teogor
Copy link
Owner

@teogor teogor commented Feb 8, 2024

Summary:

This pull request introduces a new function named supportsDifficulty to the GameType enum. This function allows determining whether a specific GameType supports a given Difficulty level.

Details:

  • The supportsDifficulty function takes a Difficulty as input and returns true if the current GameType supports it, and false otherwise.
  • This functionality utilizes the SEEDS data source to determine compatible combinations.
  • The implementation is efficient and leverages existing data structures.

Benefits:

  • Improved Developer Experience: Enables clear checking of supported difficulties for each GameType.
  • Enhanced Code Readability: Provides a dedicated function for this common task.
  • Reduced Errors: Helps prevent invalid Difficulty assignments for unsupported GameTypes.
  • Potential for Future Features: Opens doors for Difficulty-based gameplay mechanics.

@teogor teogor added @priority-medium @feature New feature or request labels Feb 8, 2024
@teogor teogor added this to the 1.0.0-alpha04 milestone Feb 8, 2024
@teogor teogor self-assigned this Feb 8, 2024
@teogor teogor merged commit df1d147 into main Feb 8, 2024
4 checks passed
@zeobot zeobot bot deleted the enhance/gametype-model-check-difficulty branch February 8, 2024 00:40
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