로그인
KO
games/sorcery / src / Game / RoomExtra.php · commit 613f5fb
<?phpnamespace App\Game;/** A lantern or a teleporter placed in a room by the level definition. */final class RoomExtra{    public const LANTERN = 1;    public const TELEPORTER = 2;    public function __construct(        public int $type = self::LANTERN,        public int $room = 0,        public int $y = 0,        public int $x = 0,        public int $toRoom = 0,        public int $toY = 0,        public int $toX = 0,        public bool $taken = false,    ) {    }    public static function from(self $o): self    {        return new self($o->type, $o->room, $o->y, $o->x, $o->toRoom, $o->toY, $o->toX, $o->taken);    }}