public function addTile(Tile $tile, $distance = 0) { $coreIsNotYetBuilt = !$this->coreIsBuilt; if ($coreIsNotYetBuilt) { $this->tiles[] = [$tile->getCoordinates(), $distance]; } else { throw new LittleMapCannotGrowException(); } }
public function testConstructorWithoutParameters() { $tile = new Tile(); $this->assertTrue([0, 0] === $tile->getCoordinates()); }