Start a fire at a random place, random disaster or scenario */
| 273 | |
| 274 | /** Start a fire at a random place, random disaster or scenario */ |
| 275 | void Micropolis::setFire() |
| 276 | { |
| 277 | short x, y, z; |
| 278 | |
| 279 | x = getRandom(WORLD_W - 1); |
| 280 | y = getRandom(WORLD_H - 1); |
| 281 | z = map[x][y]; |
| 282 | |
| 283 | if ((z & ZONEBIT) == 0) { |
| 284 | z = z & LOMASK; |
| 285 | if (z > LHTHR && z < LASTZONE) { |
| 286 | map[x][y] = randomFire(); |
| 287 | sendMessage(MESSAGE_FIRE_REPORTED, x, y, true); |
| 288 | } |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | |
| 293 | /** Start a fire at a random place, requested by user */ |
no outgoing calls
no test coverage detected