Add day 12 part 1

This commit is contained in:
2019-12-12 14:09:52 +01:00
parent 1273f4388b
commit 1ac5b20e1e
4 changed files with 301 additions and 0 deletions

75
day_12/Velocity.php Normal file
View File

@@ -0,0 +1,75 @@
<?php
class Velocity
{
protected $x;
protected $y;
protected $z;
/**
* Velocity constructor.
* @param $x
* @param $y
* @param $z
*/
public function __construct($x, $y, $z)
{
$this->x = $x;
$this->y = $y;
$this->z = $z;
}
/**
* @return mixed
*/
public function getX()
{
return $this->x;
}
/**
* @param mixed $x
* @return Velocity
*/
public function setX($x)
{
$this->x = $x;
return $this;
}
/**
* @return mixed
*/
public function getY()
{
return $this->y;
}
/**
* @param mixed $y
* @return Velocity
*/
public function setY($y)
{
$this->y = $y;
return $this;
}
/**
* @return mixed
*/
public function getZ()
{
return $this->z;
}
/**
* @param mixed $z
* @return Velocity
*/
public function setZ($z)
{
$this->z = $z;
return $this;
}
}