Lions, and Tigers, and… Magic Numbers!?

Enums, switch statements, and avoiding magic numbers

Photo by Julius Drost on Unsplash
Example of If-Else statement that uses magic numbers
PoweupTypes Enum
Switch statement using Enum

Next Time!

Unity Game Developer, Software Engineer, Gamer, Musician, and Father. Christopher is a creative that enjoys a challenge and loves coding.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store