Add some kind of register method in order to have all the units register to the factory.
In this way adding a new unit beomes as simple as implementing the unit, defining a unit id and registering this id to the factory within the class that implements the unit.
Add some kind of register method in order to have all the units register to the factory.
In this way adding a new unit beomes as simple as implementing the unit, defining a unit id and registering this id to the factory within the class that implements the unit.