Gets the element at a position @param x x coordinate @param y y coordinate @return element at that position or null
(final int x, final int y)
| 236 | * @return element at that position or null |
| 237 | */ |
| 238 | public Place get(final int x, final int y) { |
| 239 | LayerElement layerElement = elements.get(x, y); |
| 240 | if(layerElement != null && layerElement instanceof Place) { |
| 241 | return (Place) layerElement; |
| 242 | } |
| 243 | return null; |
| 244 | } |
| 245 | |
| 246 | /** |
| 247 | * Gets the surrounding places, without the center place |