Open Zomis opened 1 year ago
This is kinda like https://xkcd.com/927/ but within the same project.
I had an idea to make all scope-interfaces inherit from some basic Scope
marker interfaces:
val
or fun
)All these three inherit from a common Scope
interface.
This can also then be asserted using ArchUnit. So far I don't regret this approach.
ArchUnit proves to be very very useful, with rules like:
@GameMarker
should be named *ScopeScope
A sign of code duplication: I have three different games using some kind of event/trigger-system (Coup, Dungeon Mayhem, and one more which is not yet finished). I have three different implementations of an event/trigger system to be used in games.
Some known sources of duplicated code:
Somehow I can't help but get the feeling that some features are re-invented multiple times.
I think this is because of the different approaches the project has been through:
This in addition to everything related, such as:
More effort needs to be taken to remove old code. The question then being of course: Which approach is the right one?
Could maybe ArchUnit https://www.archunit.org/use-cases help out with structuring the project better to remove duplicates and make code easier to find?