/** * @param Tile $tile * * @throws \RuntimeException */ public function addTile(Tile $tile) { if ($tile->getLevel() !== $this) { throw new \RuntimeException("Invalid Tile level"); } $this->tiles[$tile->getID()] = $tile; }
/** * @param Tile $tile * * @throws \RuntimeException */ public function addTile(Tile $tile) { if ($tile->getLevel() !== $this) { throw new \RuntimeException("Invalid Tile level"); } $this->tiles[$tile->getID()] = $tile; }