Is 145 LOC too long for a base unit system? Considering this is JS, that seems awfully short.
Who would think 145 LOC is awfully short?
Now, it's written in coffeescript and I only care about coffeescript. The output might be bizarrely complex for all I care.
It is per my hacking policy that I slim down any file longer 100 LOC to take care of technical debt that accumulates. You don't want to spend all your time writing them up and making it clean only to mess them up with extreme code addition but you don't want to wait too long to the point that it slow down your coding to a screeching halt either.
Anyway, my output is too irregular lately, thought it's a normal considering that I have my up and downs in motivation.
Lately, the code been giving me hell as I come to grip with old code and try to understand it. I reorganized the map file once again(it exceeds 100 LOC regularly), consolidating collision check functions into the Collision class. That gave me a lot of errors in my code in which I have to jump around to find. Very frustrating since the environment don't produce useful stack trace to use.
I finally got the gatherer unit to look for timber, not trees. However, there's a bug in which it will pick up a timber at the stockpile location and drop it at the same location again and again, which took me a while to figure out.
I tried to use an untested collision function that unsurprisingly doesn't work. I'll have to figure out how to make it work.