02-19-2018, 10:43 PM
Quote: I also realized that it might be that there are too many instances of Camps being created over the time.
That's what singleton would fix. Though, do you even operate on the values in Camps? If not, there shouldn't be a problem with having multiple instances... unless you have problems with memory then.
I wanted to convert Camps to singleton, but I have problems with making a static method for getInstance(). Oo' CBOT environment in the game says "Type declaration missing" if I add "static" and that's strange because I didn't remove anything. And idk how I can access static method from the outside anyway. (ClassName.method() doesn't work.)
...I think I still prefer normal languages.