I apologize for the useage of "Better" but thats seriously what I need.

I am writing a "river" generating algorithm and I have a bunch of comparisons I need to make. I was wondering if there is a better way to write all of the comparisons I have to make.

```
if Rain.value(atPosition: vector_float2(Float(columns),Float(rows))) == 1.0 {
    fullMap.setTileGroup(tileDef4, forColumn: columns, row: rows)
    if Rain.value(atPosition: vector_float2(Float(columns - 1),Float(rows + 1))) == 0.9 {
        fullMap.setTileGroup(tileDef4, forColumn: columns, row: rows)
    }
    if Rain.value(atPosition: vector_float2(Float(columns - 1),Float(rows))) == 0.9 {
        fullMap.setTileGroup(tileDef4, forColumn: columns, row: rows)
    }
    if Rain.value(atPosition: vector_float2(Float(columns - 1),Float(rows - 1))) == 0.9 {
        fullMap.setTileGroup(tileDef4, forColumn: columns, row: rows)
    }
    if Rain.value(atPosition: vector_float2(Float(columns),Float(rows - 1))) == 0.9 {
        fullMap.setTileGroup(tileDef4, forColumn: columns, row: rows)
    }
    if Rain.value(atPosition: vector_float2(Float(columns + 1),Float(rows - 1))) == 0.9 {
        fullMap.setTileGroup(tileDef4, forColumn: columns, row: rows)
    }
    if Rain.value(atPosition: vector_float2(Float(columns + 1),Float(rows))) == 0.9 {
        fullMap.setTileGroup(tileDef4, forColumn: columns, row: rows)
    }
    if Rain.value(atPosition: vector_float2(Float(columns + 1),Float(rows + 1))) == 0.9 {
        fullMap.setTileGroup(tileDef4, forColumn: columns, row: rows)
    }
    if Rain.value(atPosition: vector_float2(Float(columns),Float(rows + 1))) == 0.9 {
        fullMap.setTileGroup(tileDef4, forColumn: columns, row: rows)
    }
}

```

Basically the "Rain" is a perlin HeightMap that I am using to determine the rainfall in my tileMap. These if-statements are checking the 8 adjacent tiles in the fullMap(that meet the criteria of High rainfall) and determining the lowest value and then setting a water tile in the form of a river. 

This method is incredibly in-efficient as I am going to continue to write if-statements into these if statements to check each adjacent tile after that. It is going to be a massive chunk of code. Is there a better way to check each adjacent tile around a certain tile in a tileMap to reduce the size of my code?