Task 1: Use design pattern and implement UnitFactory
Use factory design pattern and create a factory with two methods;
- The first method must create a Unit based on type, name, and health value.
- The second method must return a list with n number of Units based on type, name, and health value. This method is used when a large number of units of the same type is needed.
Refactor the wargames-code in such a way that the factory is used appropriatly.
Edited by Runar Halvorsen Indahl