diff --git a/core/src/com/unciv/GameStarter.kt b/core/src/com/unciv/GameStarter.kt index db2aa052..eb8c30db 100644 --- a/core/src/com/unciv/GameStarter.kt +++ b/core/src/com/unciv/GameStarter.kt @@ -10,6 +10,7 @@ import com.unciv.logic.map.TileMap import com.unciv.models.gamebasics.GameBasics import com.unciv.ui.utils.getRandom import java.util.* +import kotlin.math.min class GameParameters{ @@ -77,7 +78,7 @@ class GameStarter{ fun getStartingLocations(numberOfPlayers:Int,tileMap: TileMap): Stack { for(minimumDistanceBetweenStartingLocations in 7 downTo 0){ val freeTiles = tileMap.values - .filter { it.isLand() && vectorIsWithinNTilesOfEdge(it.position,3,tileMap)} + .filter { it.isLand() && vectorIsWithinNTilesOfEdge(it.position,min(3,minimumDistanceBetweenStartingLocations),tileMap)} .toMutableList() val startingLocations = ArrayList()