|
@@ -11,13 +11,14 @@ include_once 'Archer.php';
|
|
|
|
|
|
class Barak
|
|
|
{
|
|
|
- public function buildUnit($unitType)
|
|
|
+ public function buildRangeUnit(string $unitType): RangeFireInterface
|
|
|
{
|
|
|
- if($unitType === 'Archer') {
|
|
|
+ if ($unitType === 'Archer') {
|
|
|
return new Archer();
|
|
|
}
|
|
|
- if ($unitType === 'Guard') {
|
|
|
- return new Guard();
|
|
|
+
|
|
|
+ if ($unitType === 'Arbeiter') {
|
|
|
+ return new Arbeiter();
|
|
|
}
|
|
|
}
|
|
|
}
|