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 {
|
object BuildConfig {
|
||||||
const val kotlinVersion = "1.3.71"
|
const val kotlinVersion = "1.3.71"
|
||||||
const val appName = "Unciv"
|
const val appName = "Unciv"
|
||||||
const val appCodeNumber = 495
|
const val appCodeNumber = 496
|
||||||
const val appVersion = "3.11.10"
|
const val appVersion = "3.11.10-patch1"
|
||||||
|
|
||||||
const val gdxVersion = "1.9.12"
|
const val gdxVersion = "1.9.12"
|
||||||
const val roboVMVersion = "2.3.1"
|
const val roboVMVersion = "2.3.1"
|
||||||
|
@ -128,6 +128,7 @@ class ConstructionAutomation(val cityConstructions: CityConstructions){
|
|||||||
bfs.nextStep()
|
bfs.nextStep()
|
||||||
if (tilesThatNeedWorkboat.any { bfs.hasReachedTile(it) })
|
if (tilesThatNeedWorkboat.any { bfs.hasReachedTile(it) })
|
||||||
break
|
break
|
||||||
|
if (bfs.hasEnded()) break
|
||||||
}
|
}
|
||||||
if (tilesThatNeedWorkboat.none { bfs.hasReachedTile(it) }) return
|
if (tilesThatNeedWorkboat.none { bfs.hasReachedTile(it) }) return
|
||||||
|
|
||||||
|
@ -18,13 +18,13 @@ class BFS(val startingPoint: TileInfo, val predicate : (TileInfo) -> Boolean) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun stepToEnd() {
|
fun stepToEnd() {
|
||||||
while (tilesToCheck.isNotEmpty())
|
while (!hasEnded())
|
||||||
nextStep()
|
nextStep()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun stepUntilDestination(destination: TileInfo): BFS {
|
fun stepUntilDestination(destination: TileInfo): BFS {
|
||||||
while (!tilesReached.containsKey(destination) && tilesToCheck.isNotEmpty())
|
while (!tilesReached.containsKey(destination) && !hasEnded())
|
||||||
nextStep()
|
nextStep()
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
@ -52,6 +52,8 @@ class BFS(val startingPoint: TileInfo, val predicate : (TileInfo) -> Boolean) {
|
|||||||
return path
|
return path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun hasEnded() = tilesToCheck.isEmpty()
|
||||||
|
|
||||||
fun hasReachedTile(tile: TileInfo) =
|
fun hasReachedTile(tile: TileInfo) =
|
||||||
tilesReached.containsKey(tile)
|
tilesReached.containsKey(tile)
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user