private void addNeighborGroup ( Collection < String > neighborGroups , Tile tile , int ox , int oy ) { final Tile neighbor = map . getTile ( tile . getInTileX ( ) + ox , tile . getInTileY ( ) + oy ) ; if ( neighbor != null ) { final String neighborGroup = getNeighborGroup ( tile , neighbor ) ; if ( neighborGroup != null ) { neighborGroups . add ( neighborGroup ) ; } } }
Add the neighbor group if exists .