Better starting locations on tiny map with lots of players
This commit is contained in:
parent
09b1446fea
commit
115aef50ad
1 changed files with 2 additions and 1 deletions
|
@ -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<TileInfo> {
|
||||
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<TileInfo>()
|
||||
|
|
Loading…
Reference in a new issue