| 157 | } |
| 158 | |
| 159 | int32_t Trap::getNbNeededCraftedTrap() const |
| 160 | { |
| 161 | int32_t nbNeededCraftedTrap = 0; |
| 162 | for(Tile* tile : mCoveredTiles) |
| 163 | { |
| 164 | auto it = mTileData.find(tile); |
| 165 | if(it == mTileData.end()) |
| 166 | continue; |
| 167 | |
| 168 | TrapTileData* trapTileData = static_cast<TrapTileData*>(it->second); |
| 169 | if (trapTileData->isActivated()) |
| 170 | continue; |
| 171 | |
| 172 | if(trapTileData->getCarriedCraftedTrap() != nullptr) |
| 173 | continue; |
| 174 | |
| 175 | ++nbNeededCraftedTrap; |
| 176 | } |
| 177 | |
| 178 | return nbNeededCraftedTrap; |
| 179 | } |
| 180 | |
| 181 | bool Trap::removeCoveredTile(Tile* t) |
| 182 | { |
no test coverage detected