02-18-2018, 10:19 PM
Singleton in normal programming has private constructor, field with element of itself, and a static getter "getInstance()" which returns that only instance.
You'll have a single object with the parameters (as a object, not a static class with values, it theoretically should get saved) and a static method (aka function) to always return that one element.
Though, I have no effing idea how statics work in CBOT... Where is the thing you think the problem is located? ^^'
You'll have a single object with the parameters (as a object, not a static class with values, it theoretically should get saved) and a static method (aka function) to always return that one element.
Though, I have no effing idea how statics work in CBOT... Where is the thing you think the problem is located? ^^'