player = $player; $this->from = $from; $this->to = $to; } public function getFrom() : Location{ return $this->from; } public function getTo() : Location{ return $this->to; } public function setTo(Location $to) : void{ Utils::checkLocationNotInfOrNaN($to); $this->to = $to; } }