Junkkah / Auto_battler

Python game project for a single-player auto battler
0 stars 0 forks source link

Magic numbers #3

Closed Junkkah closed 3 months ago

Junkkah commented 1 year ago

Remove magic numbers

Junkkah commented 1 year ago

Unify text and font creation. Font type and size can be inherited from States.

Junkkah commented 3 months ago

"I have addressed the issue by removing all magic numbers from the codebase. Descriptive variable names have been introduced to replace these magic numbers, enhancing the readability and maintainability of the code.

Additionally, I've centralized the text and font creation process by implementing methods in the Config class. This method now handles rendering text and takes parameters for size, color, and other relevant properties. With these changes, the issue has been resolved.