* Put down a water tile. * @param mapH X coordinate of the tile. * @param mapV Y coordinate of the tile. * @return Tool result. */
| 300 | * @return Tool result. |
| 301 | */ |
| 302 | ToolResult Micropolis::putDownWater(short mapH, short mapV, |
| 303 | ToolEffects *effects) |
| 304 | { |
| 305 | MapTile tile = effects->getMapTile(mapH, mapV); |
| 306 | |
| 307 | if (tile == RIVER) return TOOLRESULT_FAILED; |
| 308 | |
| 309 | effects->setMapValue(mapH, mapV, RIVER); |
| 310 | |
| 311 | effects->addCost(gCostOf[TOOL_WATER]); |
| 312 | |
| 313 | return TOOLRESULT_OK; |
| 314 | } |
| 315 | |
| 316 | |
| 317 | /** |
nothing calls this directly
no test coverage detected