* Try to start a new train sprite at the given map tile. * @param x X coordinate in map coordinate. * @param y Y coordinate in map coordinate. */
| 1829 | * @param y Y coordinate in map coordinate. |
| 1830 | */ |
| 1831 | void Micropolis::generateTrain(int x, int y) |
| 1832 | { |
| 1833 | if (totalPop > 20 && getSprite(SPRITE_TRAIN) == NULL && getRandom(25) == 0) { |
| 1834 | makeSprite(SPRITE_TRAIN, (x <<4) + TRA_GROOVE_X, (y <<4) + TRA_GROOVE_Y); |
| 1835 | } |
| 1836 | } |
| 1837 | |
| 1838 | |
| 1839 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected