News for hackers. Stuff that matters.
Re:Anyone who looks at this code instantly becomes insane by realSlavojTrump on Thursday August 01, 2019 @06:57PM (#20589142)
As mindfulgeek mentions, doing some sort of extract method refactor to slop a name onto it can be a good first step. Then do some sleuthing thru other number name pairings, inserting names in place of the numbers, until you have a solid grasp of what the names should actually be. Feathers in Working Effectively With Legacy Code brings up a concept called seams... u can insert a seam to map to objects and then do object manipulations with polymorphism.

Iirc that particular bit of code is the power logic. You can file an issue on my fork if ys like me to write more on this when im not on a broken phone.

Re:Anyone who looks at this code instantly becomes insane by realSlavojTrump on Thursday August 01, 2019 @07:02PM (#20589175)
https://github.com/polytomous/TerrariaClone/issues/6 gives an example of how i work thru this sort of question, but its also spoiler laden so view at your own risk.