You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's nothing you can do in this context to avoid magic numbers - they're things that are specific to the game implementation that you are overwriting
What we can do to make it easier to wrap our heads around is provide convenient names for these constants inside our code
You do this in a few assembly blocks and it makes the assembly block significantly more readable - it would be nice to see you take a quick pass and try to do this for all of the magic numbers
Iterative Configuration
A lot of your configuration options need to happen to >3 individual "components" back to back to back
This results in a lot of duplicated "copy/paste" code that is just "configure X, configure Y, configure Z, configure..."
It would be nice to see you define a struct for these configuration options that we then iterate through a list of to apply
Why struct?
It's nice for these things to have names associated with them that can provide a sense of self documentation
Why does it matter that we iterate through?
You can always move struct definitions out into a separate file if it gets really long and ugly
You wouldn't want to arbitrarily split up your configuration into multiple files for no reason if they are logically all the same configuration type
Because of this, iterating through struct definitions makes it more extensible as you want to add more of this type of configuration
The text was updated successfully, but these errors were encountered:
Magic Numbers
Iterative Configuration
The text was updated successfully, but these errors were encountered: