* Get a tile from the map. * @param x X coordinate of the position to get, 0 to WORLD_W. * @param y Y coordinate of the position to get, 0 to WORLD_H. * @return Value of the map at the given position. * @note Off-map positions are considered to contain #DIRT. */
| 334 | * @note Off-map positions are considered to contain #DIRT. |
| 335 | */ |
| 336 | int Micropolis::getTile(int x, int y) |
| 337 | { |
| 338 | if (!testBounds(x, y)) { |
| 339 | return DIRT; |
| 340 | } |
| 341 | |
| 342 | return map[x][y]; |
| 343 | } |
| 344 | |
| 345 | |
| 346 | /** |
nothing calls this directly
no test coverage detected