Dependency injection and inversion of control #322
Labels
breaking
This change will break savegame compatibility.
technical debt
Things that would make the code cleaner but deliver little to no value to users.
Milestone
What needs to be cleaned up?
Implement dependency injection (DI) and inversion of control (IoC) by adding interfaces for classes in the core projects and moving the implementations (concrete classes) to external projects that can be referenced via an IoC container. Perhaps also split up the core projects into a hierarchy of smaller projects.
How will this benefit us?
Make the code much more clean and modular. Allow for replacement of sections of the game's code (e.g alternate combat mechanics) by flipping a configuration switch in the DI configuration.
What potential drawbacks are there to making this change?
It's a lot of work to go through and untangle all the dependencies and add interfaces for everything. Will surely introduce some bugs. Splitting up projects might make debugging harder.
The text was updated successfully, but these errors were encountered: