Skip to content

Refactor entry switch into strategy pattern#21

Open
Justin-dr wants to merge 1 commit into
REPOModding:mainfrom
Justin-dr:strategy-pattern
Open

Refactor entry switch into strategy pattern#21
Justin-dr wants to merge 1 commit into
REPOModding:mainfrom
Justin-dr:strategy-pattern

Conversation

@Justin-dr

Copy link
Copy Markdown

This PR contains only a refactor of the giant entry switch to more manageable ConfigStrategies.

Further refactoring is possible (there is a lot of duplicate code), but is out of scope for this PR.

Changes tested locally but feel free to validate them yourself as well.

@Justin-dr

Copy link
Copy Markdown
Author

The Enum path also doesn't cleanly fit into a strategy so I just left that in the ConfigMenu class. That being said I did extract it to its own method for clarity.

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.

1 participant