mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-13 12:27:40 +07:00
3.11.10-patch1
This commit is contained in:
parent
4667594731
commit
e3fc967216
@ -3,8 +3,8 @@ package com.unciv.build
|
||||
object BuildConfig {
|
||||
const val kotlinVersion = "1.3.71"
|
||||
const val appName = "Unciv"
|
||||
const val appCodeNumber = 495
|
||||
const val appVersion = "3.11.10"
|
||||
const val appCodeNumber = 496
|
||||
const val appVersion = "3.11.10-patch1"
|
||||
|
||||
const val gdxVersion = "1.9.12"
|
||||
const val roboVMVersion = "2.3.1"
|
||||
|
@ -128,6 +128,7 @@ class ConstructionAutomation(val cityConstructions: CityConstructions){
|
||||
bfs.nextStep()
|
||||
if (tilesThatNeedWorkboat.any { bfs.hasReachedTile(it) })
|
||||
break
|
||||
if (bfs.hasEnded()) break
|
||||
}
|
||||
if (tilesThatNeedWorkboat.none { bfs.hasReachedTile(it) }) return
|
||||
|
||||
|
@ -18,13 +18,13 @@ class BFS(val startingPoint: TileInfo, val predicate : (TileInfo) -> Boolean) {
|
||||
}
|
||||
|
||||
fun stepToEnd() {
|
||||
while (tilesToCheck.isNotEmpty())
|
||||
while (!hasEnded())
|
||||
nextStep()
|
||||
}
|
||||
|
||||
|
||||
fun stepUntilDestination(destination: TileInfo): BFS {
|
||||
while (!tilesReached.containsKey(destination) && tilesToCheck.isNotEmpty())
|
||||
while (!tilesReached.containsKey(destination) && !hasEnded())
|
||||
nextStep()
|
||||
return this
|
||||
}
|
||||
@ -52,6 +52,8 @@ class BFS(val startingPoint: TileInfo, val predicate : (TileInfo) -> Boolean) {
|
||||
return path
|
||||
}
|
||||
|
||||
fun hasEnded() = tilesToCheck.isEmpty()
|
||||
|
||||
fun hasReachedTile(tile: TileInfo) =
|
||||
tilesReached.containsKey(tile)
|
||||
}
|
Loading…
Reference in New Issue
Block a user