Obvious disclaimer here: this is for more veteran coders for use on the repeated levels (Brawls and such).
I’ve used functions in a couple of cases, which hasn’t actually made the code more concise, but does separate out some of the looping and makes it easier to read the code and debug (especially when you can only look at 10 or so lines of code in the window).
Yesterday I was peeking at someone else’s code from the high scores window (which usually doesn’t work for me, btw, but sometimes does). Unfortunately I can’t find it agan and post it, but I believe it was python with decorators. So even though it was a higher level of (I think) Sarven Treasure, the code was very brief, and most lines started with @, which is beyond my python skillz but I believe those are decorators (fancy functions).
But, I didn’t notice where the decorators/functions were defined. So, immediate question is can I store functions somewhere and then globally access them on individual levels?
And more generally, I’m just looking for any tips for dealing with the fact that it gets to be a pain to edit things in code combat once your program exceeds 30 or so lines. I know copy and paste to an external editor is one option, but I’m looking for other ways, if they exist. Thanks!