| 364 | } |
| 365 | |
| 366 | bool TileContainer::addTile(Tile* t) |
| 367 | { |
| 368 | int x = t->getX(); |
| 369 | int y = t->getY(); |
| 370 | |
| 371 | if (x < getMapSizeX() && y < getMapSizeY() && x >= 0 && y >= 0) |
| 372 | { |
| 373 | if(mTiles[x][y] != nullptr) |
| 374 | { |
| 375 | mTiles[x][y]->destroyMesh(); |
| 376 | delete mTiles[x][y]; |
| 377 | } |
| 378 | mTiles[x][y] = t; |
| 379 | return true; |
| 380 | } |
| 381 | |
| 382 | return false; |
| 383 | } |
| 384 | |
| 385 | void TileContainer::setTileNeighbors(Tile *t) |
| 386 | { |
no test coverage detected