* @category Class * @license https://www.gnu.org/licenses/lgpl-3.0.en.html GNU Lesser General Public License * @link www.splendidbear.org * @since 2026. 04. 21. * * @extends PersistentProxyObjectFactory */ class GridFactory extends PersistentProxyObjectFactory { protected function defaults(): array { return [ 'playedGame' => PlayedGameFactory::new(), ]; } public static function class(): string { return Grid::class; } protected function initialize(): static { return $this->afterInstantiate(function (Grid $grid): void { for ($i = 0; $i < 16; $i++) { /** @var GridRow $factory */ $factory = GridRowFactory::new()->create()->_real(); $grid->addGridRow($factory); } }); } }