You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discussion and suggestions are greatly welcomed in Enhancement threads!
Suggested by Michal Certicky:
Implement a class/interface that would allow defining modules.
My example solution: We introduce AtlantisModule class that overrides with empty body all important methods like onFrame , onUnitCreate etc. Then basically all of the core Atlantis functionality can extend AtlantisModule and this way we can achieve full (?) modularity and easily add/remove modules. Also add modules from different repositories.
Advantage of class over interface is that new module is not forced to override all possible methods, actually it can just override one method (e.g. onFrame) and still work.
The text was updated successfully, but these errors were encountered:
That's pretty much exactly what I meant :) So AtlantisModule will be an abstract class and all the other "module" classes like AtlantisWorkerCommander or AtlantisScoutManager will extend it, right?
Yes, that is the plan. There may be some problems like e.g. normally I'm always using static methods, because they're super clear to use and it's impossible (I think) to be using inheritance with static methods so I may need to run non-static method calls, which could lead to decreased code readibility. E.g. it would look something like: module.update()
instead of: AtlantisPainter.update();
But we will gain modularity. I will aim at approach that will be very clear, that's for sure.
Oh, I see.
I actually expected that each module would be instantiated when the bot is started and would be able to hold its own properties/variables. So when I'm making my own module, I can hold some specific variables inside it.
Discussion and suggestions are greatly welcomed in Enhancement threads!
Suggested by Michal Certicky:
Implement a class/interface that would allow defining modules.
My example solution: We introduce AtlantisModule class that overrides with empty body all important methods like onFrame , onUnitCreate etc. Then basically all of the core Atlantis functionality can extend AtlantisModule and this way we can achieve full (?) modularity and easily add/remove modules. Also add modules from different repositories.
Advantage of class over interface is that new module is not forced to override all possible methods, actually it can just override one method (e.g. onFrame) and still work.
The text was updated successfully, but these errors were encountered: