* Return the size of the zone that the tile belongs to. * @param tileValue Value of the tile in the zone. * @return Size of the zone if it is a known tile value, else \c 0. */
| 538 | * @return Size of the zone if it is a known tile value, else \c 0. |
| 539 | */ |
| 540 | short Micropolis::checkSize(short tileValue) |
| 541 | { |
| 542 | // check for the normal com, resl, ind 3x3 zones & the fireDept & PoliceDept |
| 543 | if ((tileValue >= RESBASE - 1 && tileValue <= PORTBASE - 1) || |
| 544 | (tileValue >= LASTPOWERPLANT + 1 && tileValue <= POLICESTATION + 4) || |
| 545 | (tileValue >= CHURCH1BASE && tileValue <= CHURCH7LAST)) { |
| 546 | return 3; |
| 547 | } |
| 548 | |
| 549 | if ((tileValue >= PORTBASE && tileValue <= LASTPORT) || |
| 550 | (tileValue >= COALBASE && tileValue <= LASTPOWERPLANT) || |
| 551 | (tileValue >= STADIUMBASE && tileValue <= LASTZONE)) { |
| 552 | return 4; |
| 553 | } |
| 554 | |
| 555 | return 0; |
| 556 | } |
| 557 | |
| 558 | |
| 559 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected