public function add($unit, $x, $y, $direction = null) { $this->units[] = $unit; $unit->position = new Position($this, $x, $y, $direction); }