<?php
declare(strict_types=1);

namespace App\Services;

use App\Entity\Galaxy;
use App\Entity\Sector;

class GalaxyFactory
{
    public function createGalaxy(int $nbSectors = 1000): Galaxy
    {
        $galaxy = new Galaxy();

        for ($i = 0; $i < $nbSectors; $i++) {
            $sector = $this->createSector();
            $galaxy->addSector($sector);
        }

        return $galaxy;
    }

    protected function createSector(): Sector {
        $sector = new Sector();

        return $sector;
    }
}