2021-03-09 12:46:30 -05:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Aviat\Kilo;
|
|
|
|
|
|
|
|
class Position {
|
|
|
|
private function __construct(public int $x, public int $y) {}
|
|
|
|
|
2021-03-09 13:37:03 -05:00
|
|
|
public static function new(int $x = 0, int $y = 0): self
|
2021-03-09 12:46:30 -05:00
|
|
|
{
|
|
|
|
return new Position($x, $y);
|
|
|
|
}
|
|
|
|
}
|