/** * @test */ public function it_generates_uuid() { $this->assertRegExp(self::PATTERN_UUID, (string) GameIdentifier::generate()); }
/** * Creates a new game. * * @param int $width * @param int $height * @param array $shipSizes * * @return static */ public static function create($width = null, $height = null, array $shipSizes = null) { return new static(GameIdentifier::generate(), Grid::generate($width, $height, $shipSizes), Score::create()); }