mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -04:00
Fixed tests
This commit is contained in:
parent
f387de9506
commit
a37391781a
@ -34,7 +34,7 @@ import org.junit.runner.RunWith
|
|||||||
class CapitalConnectionsFinderTests {
|
class CapitalConnectionsFinderTests {
|
||||||
|
|
||||||
private var gameInfo = GameInfo()
|
private var gameInfo = GameInfo()
|
||||||
private val testCivilizationNames = arrayListOf("America", "Germany", "Greece")
|
private val testCivilizationNames = arrayListOf("America", "Germany", "Greece","Hanoi", "Genoa")
|
||||||
private var rules = Ruleset()
|
private var rules = Ruleset()
|
||||||
|
|
||||||
private fun ourCiv() = gameInfo.civilizations.first()
|
private fun ourCiv() = gameInfo.civilizations.first()
|
||||||
@ -195,16 +195,16 @@ class CapitalConnectionsFinderTests {
|
|||||||
createCity(ourCiv(), Vector2(0f, -4f), "Not connected"),
|
createCity(ourCiv(), Vector2(0f, -4f), "Not connected"),
|
||||||
createCity(ourCiv(), Vector2(0f, 4f), "Connected"))
|
createCity(ourCiv(), Vector2(0f, 4f), "Connected"))
|
||||||
|
|
||||||
val openCiv = gameInfo.getCivilization("Germany")
|
val openCiv = gameInfo.getCivilization("Hanoi")
|
||||||
openCiv.nation.cityStateType = "Cultured"
|
// openCiv.nation.cityStateType = "Cultured"
|
||||||
openCiv.cities = listOf( createCity(openCiv, Vector2(0f, 2f), "Berlin", true))
|
openCiv.cities = listOf( createCity(openCiv, Vector2(0f, 2f), "Berlin", true))
|
||||||
ourCiv().diplomacy["Germany"] = DiplomacyManager(ourCiv(), "Germany")
|
ourCiv().diplomacy["Hanoi"] = DiplomacyManager(ourCiv(), "Hanoi")
|
||||||
.apply { diplomaticStatus = DiplomaticStatus.Peace }
|
.apply { diplomaticStatus = DiplomaticStatus.Peace }
|
||||||
|
|
||||||
val closedCiv = gameInfo.getCivilization("Greece")
|
val closedCiv = gameInfo.getCivilization("Genoa")
|
||||||
closedCiv.nation.cityStateType = "Cultured"
|
closedCiv.nation.cityStateType = "Cultured"
|
||||||
closedCiv.cities = listOf( createCity(closedCiv, Vector2(0f, -2f), "Athens", true))
|
closedCiv.cities = listOf( createCity(closedCiv, Vector2(0f, -2f), "Athens", true))
|
||||||
ourCiv().diplomacy["Greece"] = DiplomacyManager(ourCiv(), "Greece")
|
ourCiv().diplomacy["Genoa"] = DiplomacyManager(ourCiv(), "Genoa")
|
||||||
.apply { diplomaticStatus = DiplomaticStatus.War }
|
.apply { diplomaticStatus = DiplomaticStatus.War }
|
||||||
|
|
||||||
|
|
||||||
|
@ -280,6 +280,7 @@ class UnitMovementTests {
|
|||||||
position.set(0f, i.toFloat())
|
position.set(0f, i.toFloat())
|
||||||
tile.tileMap.tileMatrix.last().add(this)
|
tile.tileMap.tileMatrix.last().add(this)
|
||||||
newTiles.add(this)
|
newTiles.add(this)
|
||||||
|
setTerrainTransients()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// allow this tile to be teleported to
|
// allow this tile to be teleported to
|
||||||
|
Loading…
x
Reference in New Issue
Block a user