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] calculateSpellslots() in core.js #10

Open
KingFruit85 opened this issue Oct 8, 2019 · 2 comments
Open

[REFACTOR] calculateSpellslots() in core.js #10

KingFruit85 opened this issue Oct 8, 2019 · 2 comments

Comments

@KingFruit85
Copy link
Owner

Review to see if this can be simplified/refactored as currently quite a beasty function

@HedgehogHolly
Copy link
Collaborator

Is this one you could give me guidance on? 🤔

@KingFruit85
Copy link
Owner Author

@HedgehogHolly So this one is looking at if the function could be written more efficiently, I haven't had a chance to look at it properly but i think it's just a big if/elseif loop.

I think i was considering breaking it into smaller functions that focused on one class each, for example

calculateBardSpellSlots()

If we did that, then calculateSpellslots() could just be a switch case that calls the sub functions, does that make sense?

It's more of a readability change if anything.

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

No branches or pull requests

2 participants