mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-29 06:35:41 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c69912c948 | ||
|
|
549cf37127 |
+1
-1
@@ -279,7 +279,7 @@ class ActionResultApplierImpl(validator: Option[Validator]) extends ActionResult
|
|||||||
.getOrElse(afterVictor)
|
.getOrElse(afterVictor)
|
||||||
|
|
||||||
val afterEagleMap = result.newEagleMap
|
val afterEagleMap = result.newEagleMap
|
||||||
.map(em => afterGameType.copy(eagleMap = Some(em)))
|
.map(em => afterGameType.copy(eagleMap = em))
|
||||||
.getOrElse(afterGameType)
|
.getOrElse(afterGameType)
|
||||||
|
|
||||||
afterEagleMap.copy(actionResultCount = afterEagleMap.actionResultCount + 1)
|
afterEagleMap.copy(actionResultCount = afterEagleMap.actionResultCount + 1)
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ object GameStateViewFilter {
|
|||||||
battalionTypes = gs.battalionTypes,
|
battalionTypes = gs.battalionTypes,
|
||||||
chronicleEntries = gs.chronicleEntries,
|
chronicleEntries = gs.chronicleEntries,
|
||||||
gameType = gs.gameType,
|
gameType = gs.gameType,
|
||||||
eagleMap = gs.eagleMap
|
eagleMap = Some(gs.eagleMap)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ import net.eagle0.eagle.common.eagle_map_info.EagleMapInfo as EagleMapInfoProto
|
|||||||
import net.eagle0.eagle.model.state.game_state.EagleMapInfo
|
import net.eagle0.eagle.model.state.game_state.EagleMapInfo
|
||||||
|
|
||||||
object EagleMapInfoConverter {
|
object EagleMapInfoConverter {
|
||||||
|
private def isSet(proto: EagleMapInfoProto): Boolean =
|
||||||
|
proto.mapWidth != 0 || proto.mapHeight != 0 || proto.sha256.nonEmpty
|
||||||
|
|
||||||
def toProto(eagleMapInfo: EagleMapInfo): EagleMapInfoProto =
|
def toProto(eagleMapInfo: EagleMapInfo): EagleMapInfoProto =
|
||||||
EagleMapInfoProto(
|
EagleMapInfoProto(
|
||||||
mapWidth = eagleMapInfo.mapWidth,
|
mapWidth = eagleMapInfo.mapWidth,
|
||||||
@@ -20,8 +23,14 @@ object EagleMapInfoConverter {
|
|||||||
centroidsSha256 = proto.centroidsSha256
|
centroidsSha256 = proto.centroidsSha256
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def fromRequiredProto(proto: Option[EagleMapInfoProto]): EagleMapInfo = {
|
||||||
|
val eagleMapInfo = proto
|
||||||
|
.getOrElse(throw new IllegalArgumentException("EagleMapInfo proto is required"))
|
||||||
|
fromProto(eagleMapInfo)
|
||||||
|
}
|
||||||
|
|
||||||
def fromProtoOption(proto: Option[EagleMapInfoProto]): Option[EagleMapInfo] =
|
def fromProtoOption(proto: Option[EagleMapInfoProto]): Option[EagleMapInfo] =
|
||||||
proto
|
proto
|
||||||
.filter(p => p.mapWidth != 0 || p.mapHeight != 0 || p.sha256.nonEmpty)
|
.filter(isSet)
|
||||||
.map(fromProto)
|
.map(fromProto)
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -71,7 +71,7 @@ object GameStateConverter {
|
|||||||
randomSeed: Long,
|
randomSeed: Long,
|
||||||
chronicleEntries: Vector[ChronicleEntry],
|
chronicleEntries: Vector[ChronicleEntry],
|
||||||
gameType: GameType,
|
gameType: GameType,
|
||||||
eagleMap: Option[net.eagle0.eagle.model.state.game_state.EagleMapInfo]
|
eagleMap: net.eagle0.eagle.model.state.game_state.EagleMapInfo
|
||||||
) =>
|
) =>
|
||||||
GameStateProto(
|
GameStateProto(
|
||||||
gameId = gameId,
|
gameId = gameId,
|
||||||
@@ -97,7 +97,7 @@ object GameStateConverter {
|
|||||||
chronicleEntries = chronicleEntries.map(ChronicleEntryConverter.toProto),
|
chronicleEntries = chronicleEntries.map(ChronicleEntryConverter.toProto),
|
||||||
gameType = GameTypeConverter.toProto(gameType)._1,
|
gameType = GameTypeConverter.toProto(gameType)._1,
|
||||||
tutorialPhase = GameTypeConverter.toProto(gameType)._2,
|
tutorialPhase = GameTypeConverter.toProto(gameType)._2,
|
||||||
eagleMap = eagleMap.map(EagleMapInfoConverter.toProto)
|
eagleMap = Some(EagleMapInfoConverter.toProto(eagleMap))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ object GameStateConverter {
|
|||||||
gameType =
|
gameType =
|
||||||
if gameType == GameTypeProto.UNKNOWN_GAME_TYPE then GameType.Normal
|
if gameType == GameTypeProto.UNKNOWN_GAME_TYPE then GameType.Normal
|
||||||
else GameTypeConverter.fromProto(gameType, tutorialPhase),
|
else GameTypeConverter.fromProto(gameType, tutorialPhase),
|
||||||
eagleMap = EagleMapInfoConverter.fromProtoOption(eagleMap)
|
eagleMap = EagleMapInfoConverter.fromRequiredProto(eagleMap)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,5 +37,5 @@ case class GameState(
|
|||||||
randomSeed: Long,
|
randomSeed: Long,
|
||||||
chronicleEntries: Vector[ChronicleEntry],
|
chronicleEntries: Vector[ChronicleEntry],
|
||||||
gameType: GameType,
|
gameType: GameType,
|
||||||
eagleMap: Option[EagleMapInfo] = None
|
eagleMap: EagleMapInfo
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -54,7 +54,13 @@ object InMemoryHistory {
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = net.eagle0.eagle.model.state.GameType.Normal
|
gameType = net.eagle0.eagle.model.state.GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2017,7 +2017,13 @@ object SqliteHistory {
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -493,14 +493,12 @@ object FixedNewGameCreation extends NewGameCreation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private def genericStartGameResult(gameId: GameId, gameParameters: GameParameters): ActionResultC = {
|
private def genericStartGameResult(gameId: GameId, gameParameters: GameParameters): ActionResultC = {
|
||||||
val eagleMapProto = gameParameters.eagleMap
|
val eagleMapProto = gameParameters.getEagleMap
|
||||||
val eagleMap = eagleMapProto.map(em =>
|
val eagleMap = EagleMapInfo(
|
||||||
EagleMapInfo(
|
mapWidth = eagleMapProto.mapWidth,
|
||||||
mapWidth = em.mapWidth,
|
mapHeight = eagleMapProto.mapHeight,
|
||||||
mapHeight = em.mapHeight,
|
sha256 = eagleMapProto.sha256,
|
||||||
sha256 = em.sha256,
|
centroidsSha256 = eagleMapProto.centroidsSha256
|
||||||
centroidsSha256 = em.centroidsSha256
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
ActionResultC(
|
ActionResultC(
|
||||||
actionResultType = ActionResultType.GameStart,
|
actionResultType = ActionResultType.GameStart,
|
||||||
@@ -514,7 +512,7 @@ object FixedNewGameCreation extends NewGameCreation {
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
newRandomSeed = Some(gameId),
|
newRandomSeed = Some(gameId),
|
||||||
newEagleMap = eagleMap
|
newEagleMap = Some(eagleMap)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-8
@@ -110,13 +110,12 @@ object TutorialGameCreation {
|
|||||||
|
|
||||||
// Start with base ActionResultC
|
// Start with base ActionResultC
|
||||||
// Start at BattleRequest phase so battle begins immediately
|
// Start at BattleRequest phase so battle begins immediately
|
||||||
val eagleMap = tutorialParams.eagleMap.map(em =>
|
val eagleMapProto = tutorialParams.getEagleMap
|
||||||
EagleMapInfo(
|
val eagleMap = EagleMapInfo(
|
||||||
mapWidth = em.mapWidth,
|
mapWidth = eagleMapProto.mapWidth,
|
||||||
mapHeight = em.mapHeight,
|
mapHeight = eagleMapProto.mapHeight,
|
||||||
sha256 = em.sha256,
|
sha256 = eagleMapProto.sha256,
|
||||||
centroidsSha256 = em.centroidsSha256
|
centroidsSha256 = eagleMapProto.centroidsSha256
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
val baseResult = ActionResultC(
|
val baseResult = ActionResultC(
|
||||||
@@ -127,7 +126,7 @@ object TutorialGameCreation {
|
|||||||
newRandomSeed = Some(gameId),
|
newRandomSeed = Some(gameId),
|
||||||
newProvinces = provinces,
|
newProvinces = provinces,
|
||||||
newGameType = Some(GameType.Tutorial(TutorialPhase.OpeningBattle)),
|
newGameType = Some(GameType.Tutorial(TutorialPhase.OpeningBattle)),
|
||||||
newEagleMap = eagleMap
|
newEagleMap = Some(eagleMap)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Build factions, heroes, and battalions from tutorial parameters
|
// Build factions, heroes, and battalions from tutorial parameters
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class HolyWaveCommandTest : public ::testing::Test {
|
|||||||
auto actorOff = AddGenericUnit(2, 0, Coords(2, 2));
|
auto actorOff = AddGenericUnit(2, 0, Coords(2, 2));
|
||||||
auto otherOff1 = AddGenericUnit(2, 1, Coords(2, 3));
|
auto otherOff1 = AddGenericUnit(2, 1, Coords(2, 3));
|
||||||
auto otherOff2 = AddGenericUnit(2, 2, Coords(2, 1));
|
auto otherOff2 = AddGenericUnit(2, 2, Coords(2, 1));
|
||||||
auto units = vector<Unit>{actorOff, otherOff1, otherOff2};
|
vector<Unit> units{actorOff, otherOff1, otherOff2};
|
||||||
auto unitsOff = fbb.CreateVectorOfSortedStructs(&units);
|
auto unitsOff = fbb.CreateVectorOfSortedStructs(&units);
|
||||||
|
|
||||||
auto chargeesOff = fbb.CreateVector(vector<UnitId>(6));
|
auto chargeesOff = fbb.CreateVector(vector<UnitId>(6));
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class LightningBoltCommandTests : public ::testing::Test {
|
|||||||
auto mageOff = AddGenericUnit(1, 0, Coords(2, 2));
|
auto mageOff = AddGenericUnit(1, 0, Coords(2, 2));
|
||||||
auto defenderOff = AddGenericUnit(2, 1, Coords(2, 4));
|
auto defenderOff = AddGenericUnit(2, 1, Coords(2, 4));
|
||||||
|
|
||||||
auto unitsVec = vector<Unit>{mageOff, defenderOff};
|
vector<Unit> unitsVec{mageOff, defenderOff};
|
||||||
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
|
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
|
||||||
|
|
||||||
GameStateBuilder gsb(fbb);
|
GameStateBuilder gsb(fbb);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class MoveCommandTest : public ::testing::Test {
|
|||||||
fbb.ForceDefaults(true);
|
fbb.ForceDefaults(true);
|
||||||
Unit movingUnitOff = AddGenericUnit(1, movingUnitId, startLocation);
|
Unit movingUnitOff = AddGenericUnit(1, movingUnitId, startLocation);
|
||||||
|
|
||||||
auto vec = vector<Unit>{movingUnitOff};
|
vector<Unit> vec{movingUnitOff};
|
||||||
auto u = fbb.CreateVectorOfSortedStructs(&vec);
|
auto u = fbb.CreateVectorOfSortedStructs(&vec);
|
||||||
|
|
||||||
// Copy the hex_map to the FlatBuffer
|
// Copy the hex_map to the FlatBuffer
|
||||||
@@ -53,7 +53,7 @@ class MoveCommandTest : public ::testing::Test {
|
|||||||
net::eagle0::shardok::storage::fb::Profession_RANGER,
|
net::eagle0::shardok::storage::fb::Profession_RANGER,
|
||||||
[](net::eagle0::shardok::storage::fb::Unit& /*builder*/) { return; });
|
[](net::eagle0::shardok::storage::fb::Unit& /*builder*/) { return; });
|
||||||
|
|
||||||
auto vec2 = vector<Unit>{movingUnitOff2, enemyRangerOff2};
|
vector<Unit> vec2{movingUnitOff2, enemyRangerOff2};
|
||||||
auto u2 = fbbWithRanger.CreateVectorOfSortedStructs(&vec2);
|
auto u2 = fbbWithRanger.CreateVectorOfSortedStructs(&vec2);
|
||||||
|
|
||||||
// Initialize possible_chargee_ids with 6 elements set to -1
|
// Initialize possible_chargee_ids with 6 elements set to -1
|
||||||
@@ -99,7 +99,7 @@ class MoveCommandTest : public ::testing::Test {
|
|||||||
|
|
||||||
Unit otherUnit = AddGenericUnit(2, hiddenRangerId, Coords(5, 5));
|
Unit otherUnit = AddGenericUnit(2, hiddenRangerId, Coords(5, 5));
|
||||||
|
|
||||||
auto vec3 = vector<Unit>{undeadUnit, otherUnit};
|
vector<Unit> vec3{undeadUnit, otherUnit};
|
||||||
auto u3 = fbbUndead.CreateVectorOfSortedStructs(&vec3);
|
auto u3 = fbbUndead.CreateVectorOfSortedStructs(&vec3);
|
||||||
|
|
||||||
// Copy the hex_map to the new FlatBuffer
|
// Copy the hex_map to the new FlatBuffer
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class RaiseDeadCommandTest : public ::testing::Test {
|
|||||||
auto actorOff = AddGenericUnit(5, 0, position);
|
auto actorOff = AddGenericUnit(5, 0, position);
|
||||||
auto otherOff = AddGenericUnit(6, 1, Coords(5, 5));
|
auto otherOff = AddGenericUnit(6, 1, Coords(5, 5));
|
||||||
|
|
||||||
auto unitsVec = vector<Unit>{actorOff, otherOff};
|
vector<Unit> unitsVec{actorOff, otherOff};
|
||||||
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
|
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
|
||||||
|
|
||||||
auto mapOff = AddBasicMap(fbb);
|
auto mapOff = AddBasicMap(fbb);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class ScoutCommandTest : public ::testing::Test {
|
|||||||
|
|
||||||
auto rangerOff = AddGenericUnit(5, 2, Coords(0, 0));
|
auto rangerOff = AddGenericUnit(5, 2, Coords(0, 0));
|
||||||
|
|
||||||
auto unitsVec = vector<Unit>{opp1, opp2, rangerOff};
|
vector<Unit> unitsVec{opp1, opp2, rangerOff};
|
||||||
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
|
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
|
||||||
|
|
||||||
auto mapOff = AddBasicMap(fbb);
|
auto mapOff = AddBasicMap(fbb);
|
||||||
|
|||||||
@@ -75,7 +75,13 @@ class FactionLeaderProvinceRankerTest extends AnyFlatSpec with Matchers with Bef
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
"rankedProvinceIds" should "order by hostile, then hostile + neutral" in {
|
"rankedProvinceIds" should "order by hostile, then hostile + neutral" in {
|
||||||
|
|||||||
@@ -79,7 +79,13 @@ class FixLeaderAloneCommandSelectorTest extends AnyFlatSpec with Matchers with B
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private def makeMarchAvailable(
|
private def makeMarchAvailable(
|
||||||
|
|||||||
@@ -84,7 +84,13 @@ class InvitationCommandSelectorTest extends AnyFlatSpec with Matchers with Befor
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val actingFaction: FactionC = makeFaction(
|
private val actingFaction: FactionC = makeFaction(
|
||||||
|
|||||||
@@ -98,7 +98,13 @@ class MidGameAIClientTest extends AnyFlatSpec with Matchers with BeforeAndAfterE
|
|||||||
battalionTypes = battalionTypes,
|
battalionTypes = battalionTypes,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private def makeFaction(
|
private def makeFaction(
|
||||||
|
|||||||
+7
-1
@@ -110,7 +110,13 @@ class MoveLeaderToBetterProvinceCommandChooserTest extends AnyFlatSpec with Matc
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val faction: FactionC = makeFaction(
|
private val faction: FactionC = makeFaction(
|
||||||
|
|||||||
@@ -351,7 +351,13 @@ class ResolveDiplomacyCommandSelectorTest extends AnyFlatSpec with Matchers with
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val acceptRejectAndImprison =
|
private val acceptRejectAndImprison =
|
||||||
|
|||||||
@@ -146,7 +146,13 @@ class SeekMoreLeadersCommandChooserTest extends AnyFlatSpec with Matchers with B
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private def makeMarchAvailable(
|
private def makeMarchAvailable(
|
||||||
|
|||||||
+7
-1
@@ -67,7 +67,13 @@ class ActionResultApplierImplTest extends AnyFlatSpec with Matchers with BeforeA
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 1L,
|
randomSeed = 1L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
// ============ Basic State Updates ============
|
// ============ Basic State Updates ============
|
||||||
|
|||||||
+7
-1
@@ -70,7 +70,13 @@ class AvailableAlmsCommandFactoryTest extends AnyFlatSpec with Matchers with Bef
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val extraProvinceVassal1 = HeroC(
|
private val extraProvinceVassal1 = HeroC(
|
||||||
|
|||||||
+7
-1
@@ -86,7 +86,13 @@ class AvailableApprehendOutlawCommandFactoryTest extends AnyFlatSpec with Matche
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val gameState = makeGameState()
|
private val gameState = makeGameState()
|
||||||
|
|||||||
+7
-1
@@ -97,7 +97,13 @@ class AvailableArmTroopsCommandFactoryTest extends AnyFlatSpec with Matchers wit
|
|||||||
battalionTypes = battalionTypes,
|
battalionTypes = battalionTypes,
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
"availableCommands" should "return nothing if there are no battalions" in {
|
"availableCommands" should "return nothing if there are no battalions" in {
|
||||||
|
|||||||
+7
-1
@@ -184,7 +184,13 @@ class AvailableAttackDecisionCommandFactoryTest extends AnyFlatSpec with Matcher
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private def getAttackDecisionCommand(gs: GameState): AttackDecisionAvailable =
|
private def getAttackDecisionCommand(gs: GameState): AttackDecisionAvailable =
|
||||||
|
|||||||
+7
-1
@@ -62,7 +62,13 @@ class AvailableCommandsFactoryTest extends AnyFlatSpec with Matchers with MockFa
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val baseProvince = ProvinceC(
|
private val baseProvince = ProvinceC(
|
||||||
|
|||||||
+7
-1
@@ -70,7 +70,13 @@ class AvailableControlWeatherCommandsFactoryTest extends AnyFlatSpec with Before
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val gameState = makeGameState()
|
private val gameState = makeGameState()
|
||||||
|
|||||||
+7
-1
@@ -78,7 +78,13 @@ class AvailableDeclineQuestCommandsFactoryTest extends AnyFlatSpec with Matchers
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
"availableCommand" should "return None when the province is not ruled by the faction leader" in {
|
"availableCommand" should "return None when the province is not ruled by the faction leader" in {
|
||||||
|
|||||||
+7
-1
@@ -147,7 +147,13 @@ class AvailableDefendCommandsFactoryTest extends AnyFlatSpec with BeforeAndAfter
|
|||||||
battalionTypes = battalionTypes,
|
battalionTypes = battalionTypes,
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val defendingProvince = ProvinceC(
|
private val defendingProvince = ProvinceC(
|
||||||
|
|||||||
+7
-1
@@ -153,7 +153,13 @@ class AvailableDiplomacyCommandsFactoryTest extends AnyFlatSpec with Matchers wi
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private def gameState: GameState = makeGameState()
|
private def gameState: GameState = makeGameState()
|
||||||
|
|||||||
+7
-1
@@ -87,7 +87,13 @@ class AvailableDivineCommandsFactoryTest extends AnyFlatSpec with Matchers with
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
"availableCommand" should "return None when the province is not ruled by the faction leader" in {
|
"availableCommand" should "return None when the province is not ruled by the faction leader" in {
|
||||||
|
|||||||
+7
-1
@@ -58,7 +58,13 @@ class AvailableExileVassalCommandFactoryTest extends AnyFlatSpec with Matchers {
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
"availableCommand" should "include non-leader vassals" in {
|
"availableCommand" should "include non-leader vassals" in {
|
||||||
|
|||||||
+35
-5
@@ -53,7 +53,13 @@ class AvailableFeastCommandFactoryTest extends AnyFlatSpec with Matchers with Be
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
AvailableFeastCommandFactory.availableCommand(
|
AvailableFeastCommandFactory.availableCommand(
|
||||||
@@ -99,7 +105,13 @@ class AvailableFeastCommandFactoryTest extends AnyFlatSpec with Matchers with Be
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
inside(AvailableFeastCommandFactory.availableCommand(gameState, 9, 5).get) {
|
inside(AvailableFeastCommandFactory.availableCommand(gameState, 9, 5).get) {
|
||||||
@@ -144,7 +156,13 @@ class AvailableFeastCommandFactoryTest extends AnyFlatSpec with Matchers with Be
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
inside(AvailableFeastCommandFactory.availableCommand(gameState, 9, 5).get) {
|
inside(AvailableFeastCommandFactory.availableCommand(gameState, 9, 5).get) {
|
||||||
@@ -193,7 +211,13 @@ class AvailableFeastCommandFactoryTest extends AnyFlatSpec with Matchers with Be
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
inside(AvailableFeastCommandFactory.availableCommand(gameState, 9, 5).get) {
|
inside(AvailableFeastCommandFactory.availableCommand(gameState, 9, 5).get) {
|
||||||
@@ -242,7 +266,13 @@ class AvailableFeastCommandFactoryTest extends AnyFlatSpec with Matchers with Be
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
inside(AvailableFeastCommandFactory.availableCommand(gameState, 9, 5).get) {
|
inside(AvailableFeastCommandFactory.availableCommand(gameState, 9, 5).get) {
|
||||||
|
|||||||
+7
-1
@@ -97,7 +97,13 @@ class AvailableHandleCapturedHeroCommandFactoryTest
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val gameStateWithOne: GameState = inside(gameStateWithTwo.provinces(provinceId)) {
|
private val gameStateWithOne: GameState = inside(gameStateWithTwo.provinces(provinceId)) {
|
||||||
|
|||||||
+7
-1
@@ -67,7 +67,13 @@ class AvailableHandleRiotCrackDownCommandFactoryTest extends AnyFlatSpec with Be
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
override def beforeEach(): Unit =
|
override def beforeEach(): Unit =
|
||||||
|
|||||||
+7
-1
@@ -61,7 +61,13 @@ class AvailableHandleRiotDoNothingCommandFactoryTest extends AnyFlatSpec with Be
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
override def beforeEach(): Unit = {}
|
override def beforeEach(): Unit = {}
|
||||||
|
|||||||
+7
-1
@@ -53,7 +53,13 @@ class AvailableHandleRiotGiveCommandFactoryTest extends AnyFlatSpec with BeforeA
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
override def beforeEach(): Unit = {
|
override def beforeEach(): Unit = {
|
||||||
|
|||||||
+7
-1
@@ -84,7 +84,13 @@ class AvailableHeroGiftCommandFactoryTest extends AnyFlatSpec with Matchers with
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val brother1 = HeroC(
|
private val brother1 = HeroC(
|
||||||
|
|||||||
+7
-1
@@ -88,7 +88,13 @@ class AvailableImproveCommandsFactoryTest extends AnyFlatSpec with Matchers with
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val gameState = makeGameState()
|
private val gameState = makeGameState()
|
||||||
|
|||||||
+7
-1
@@ -116,7 +116,13 @@ class AvailableIssueOrdersCommandFactoryTest extends AnyFlatSpec with Matchers {
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
"availableCommands" should "return nothing if the province leader is not a faction leader" in {
|
"availableCommands" should "return nothing if the province leader is not a faction leader" in {
|
||||||
|
|||||||
+7
-1
@@ -112,7 +112,13 @@ class AvailableManagePrisonerCommandsFactoryTest extends AnyFlatSpec with Before
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private def getManagePrisonersCommand(gs: GameState): ManagePrisonersAvailable =
|
private def getManagePrisonersCommand(gs: GameState): ManagePrisonersAvailable =
|
||||||
|
|||||||
+7
-1
@@ -56,7 +56,13 @@ class AvailableMarchCommandFactoryTest extends AnyFlatSpec with BeforeAndAfterEa
|
|||||||
battalionTypes = battalionTypes,
|
battalionTypes = battalionTypes,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private def getMarchCommand(
|
private def getMarchCommand(
|
||||||
|
|||||||
+7
-1
@@ -93,7 +93,13 @@ class AvailableOrganizeTroopsCommandsFactoryTest extends AnyFlatSpec with Before
|
|||||||
battalionTypes = battalionTypes,
|
battalionTypes = battalionTypes,
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
"availableCommand" should "include all battalions, below cap or not, if stats are high enough" in {
|
"availableCommand" should "include all battalions, below cap or not, if stats are high enough" in {
|
||||||
|
|||||||
+7
-1
@@ -84,7 +84,13 @@ class AvailablePleaseRecruitMeCommandFactoryTest extends AnyFlatSpec with Before
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val baseProvinces: Map[Int, ProvinceC] = Map(actingProvince.id -> actingProvince)
|
private val baseProvinces: Map[Int, ProvinceC] = Map(actingProvince.id -> actingProvince)
|
||||||
|
|||||||
+7
-1
@@ -68,7 +68,13 @@ class AvailableReconCommandFactoryTest extends AnyFlatSpec with BeforeAndAfterEa
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val gameState = makeGameState()
|
private val gameState = makeGameState()
|
||||||
|
|||||||
+7
-1
@@ -90,7 +90,13 @@ class AvailableRecruitHeroesCommandFactoryTest extends AnyFlatSpec with Matchers
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
override def beforeEach(): Unit = {
|
override def beforeEach(): Unit = {
|
||||||
|
|||||||
+7
-1
@@ -82,7 +82,13 @@ class AvailableResolveBreakAllianceCommandFactoryTest extends AnyFlatSpec with M
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 12345L,
|
randomSeed = 12345L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
override def beforeEach(): Unit = {}
|
override def beforeEach(): Unit = {}
|
||||||
|
|||||||
+7
-1
@@ -135,7 +135,13 @@ class AvailableResolveRansomOfferCommandFactoryTest extends AnyFlatSpec with Mat
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 1L,
|
randomSeed = 1L,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val gameState = makeGameState()
|
private val gameState = makeGameState()
|
||||||
|
|||||||
+7
-1
@@ -68,7 +68,13 @@ class AvailableResolveTributeCommandsFactoryTest extends AnyFlatSpec with Matche
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private def makeHostileArmyGroup(
|
private def makeHostileArmyGroup(
|
||||||
|
|||||||
+7
-1
@@ -32,7 +32,13 @@ class AvailableRestCommandsFactoryTest extends AnyFlatSpec with Matchers {
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
val command = AvailableRestCommandsFactory.availableCommand(gameState, 12, 6)
|
val command = AvailableRestCommandsFactory.availableCommand(gameState, 12, 6)
|
||||||
|
|||||||
+7
-1
@@ -50,7 +50,13 @@ class AvailableReturnCommandsFactoryTest extends AnyFlatSpec with Matchers {
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val gameState = makeGameState()
|
private val gameState = makeGameState()
|
||||||
|
|||||||
+7
-1
@@ -72,7 +72,13 @@ class AvailableSendSuppliesCommandFactoryTest extends AnyFlatSpec with BeforeAnd
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val gameState: GameState = makeGameState()
|
private val gameState: GameState = makeGameState()
|
||||||
|
|||||||
+7
-1
@@ -100,7 +100,13 @@ class AvailableStartEpidemicCommandFactoryTest extends AnyFlatSpec with BeforeAn
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val gameState = makeGameState()
|
private val gameState = makeGameState()
|
||||||
|
|||||||
+7
-1
@@ -95,7 +95,13 @@ class AvailableSwearBrotherhoodCommandFactoryTest extends AnyFlatSpec with Match
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val gameState = makeGameState()
|
private val gameState = makeGameState()
|
||||||
|
|||||||
+7
-1
@@ -52,7 +52,13 @@ class AvailableTradeCommandFactoryTest extends AnyFlatSpec with Matchers with Be
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
override def beforeEach(): Unit = {
|
override def beforeEach(): Unit = {
|
||||||
|
|||||||
+7
-1
@@ -94,7 +94,13 @@ class AvailableTrainCommandsFactoryTest extends AnyFlatSpec with BeforeAndAfterE
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
override def beforeEach(): Unit =
|
override def beforeEach(): Unit =
|
||||||
|
|||||||
+7
-1
@@ -56,7 +56,13 @@ class AvailableTravelCommandsFactoryTest extends AnyFlatSpec with Matchers with
|
|||||||
battalionTypes = Vector(),
|
battalionTypes = Vector(),
|
||||||
randomSeed = 0,
|
randomSeed = 0,
|
||||||
chronicleEntries = Vector(),
|
chronicleEntries = Vector(),
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val gameState = makeGameState()
|
private val gameState = makeGameState()
|
||||||
|
|||||||
+7
-1
@@ -99,7 +99,13 @@ class EndBattleAftermathPhaseActionTest extends AnyFlatSpec with Matchers with B
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = randomSeed,
|
randomSeed = randomSeed,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
behavior of "EndBattleAftermathPhaseActionTest"
|
behavior of "EndBattleAftermathPhaseActionTest"
|
||||||
|
|||||||
+7
-1
@@ -118,7 +118,13 @@ class EndDefenseDecisionPhaseActionTest extends AnyFlatSpec with Matchers {
|
|||||||
victor = None,
|
victor = None,
|
||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
"execute" should "end the phase and proceed to TRUCE_TURN_BACK" in {
|
"execute" should "end the phase and proceed to TRUCE_TURN_BACK" in {
|
||||||
|
|||||||
+7
-1
@@ -39,7 +39,13 @@ class EndDiplomacyResolutionPhaseActionTest extends AnyFlatSpec with Matchers wi
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 12345L,
|
randomSeed = 12345L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val applier = ActionResultApplierImpl(Some(RuntimeValidator))
|
private val applier = ActionResultApplierImpl(Some(RuntimeValidator))
|
||||||
|
|||||||
+7
-1
@@ -73,7 +73,13 @@ class EndHandleRiotsPhaseActionTest extends AnyFlatSpec with BeforeAndAfterEach
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 1L,
|
randomSeed = 1L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
override def beforeEach(): Unit = {
|
override def beforeEach(): Unit = {
|
||||||
|
|||||||
+7
-1
@@ -144,7 +144,13 @@ class EndPlayerCommandsPhaseActionTest extends AnyFlatSpec with Matchers with Be
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = randomSeed,
|
randomSeed = randomSeed,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private def gameState: GameState = makeGameState()
|
private def gameState: GameState = makeGameState()
|
||||||
|
|||||||
+7
-1
@@ -49,7 +49,13 @@ class EndVassalCommandsPhaseActionTest extends AnyFlatSpec with Matchers {
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0xfeedfaceL,
|
randomSeed = 0xfeedfaceL,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private def endVassalResult(results: Vector[?]): ActionResultC =
|
private def endVassalResult(results: Vector[?]): ActionResultC =
|
||||||
|
|||||||
+7
-1
@@ -62,7 +62,13 @@ class FreeHeroBackstoryVisibilityRecoveryTest extends AnyFlatSpec with MockFacto
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 12345L,
|
randomSeed = 12345L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val heroWithBackstory: Map[Int, HeroT] = Map(
|
private val heroWithBackstory: Map[Int, HeroT] = Map(
|
||||||
|
|||||||
+7
-1
@@ -106,7 +106,13 @@ class NewRoundActionTest
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Helper to run NewRoundAction and return Scala ActionResults
|
// Helper to run NewRoundAction and return Scala ActionResults
|
||||||
|
|||||||
@@ -131,7 +131,13 @@ class NewYearActionTest extends AnyFlatSpec with Matchers with BeforeAndAfterEac
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private def gs: GameState = baseGameState
|
private def gs: GameState = baseGameState
|
||||||
|
|||||||
+7
-1
@@ -89,7 +89,13 @@ class PerformFoodConsumptionPhaseActionTest extends AnyFlatSpec with Matchers wi
|
|||||||
battalionTypes = battalionTypes,
|
battalionTypes = battalionTypes,
|
||||||
randomSeed = 1L,
|
randomSeed = 1L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
override def beforeEach(): Unit = {}
|
override def beforeEach(): Unit = {}
|
||||||
|
|||||||
+7
-1
@@ -75,7 +75,13 @@ class PerformForcedTurnBackActionTest extends AnyFlatSpec with Matchers with Bef
|
|||||||
victor = None,
|
victor = None,
|
||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val gsWithoutBlizzard = gsWithBlizzard.copy(
|
private val gsWithoutBlizzard = gsWithBlizzard.copy(
|
||||||
|
|||||||
+7
-1
@@ -73,7 +73,13 @@ class PerformHeroDeparturesActionTest extends AnyFlatSpec with Matchers with Bef
|
|||||||
victor = None,
|
victor = None,
|
||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
override def beforeEach(): Unit = {
|
override def beforeEach(): Unit = {
|
||||||
|
|||||||
+7
-1
@@ -63,7 +63,13 @@ class PerformHostileArmySetupActionTest extends AnyFlatSpec with Matchers {
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
"any setup" should "move to the next round phase" in {
|
"any setup" should "move to the next round phase" in {
|
||||||
|
|||||||
+7
-1
@@ -161,7 +161,13 @@ class PerformProvinceEventsActionTest extends AnyFlatSpec with BeforeAndAfterEac
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = randomSeed,
|
randomSeed = randomSeed,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
"changedProvince" should "remove beasts if we're past their end date" in {
|
"changedProvince" should "remove beasts if we're past their end date" in {
|
||||||
|
|||||||
+7
-1
@@ -115,7 +115,13 @@ class PerformProvinceMoveResolutionActionTest extends AnyFlatSpec with Matchers
|
|||||||
victor = None,
|
victor = None,
|
||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private def getResults(gs: GameState) =
|
private def getResults(gs: GameState) =
|
||||||
|
|||||||
+7
-1
@@ -65,7 +65,13 @@ class PerformReconResolutionActionTest extends AnyFlatSpec with BeforeAndAfterEa
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val baseProvinces: Map[Int, ProvinceC] = Map(
|
private val baseProvinces: Map[Int, ProvinceC] = Map(
|
||||||
|
|||||||
+7
-1
@@ -79,7 +79,13 @@ class PerformUnaffiliatedHeroesActionTest extends AnyFlatSpec with Matchers with
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 12345L,
|
randomSeed = 12345L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
override def beforeEach(): Unit = {
|
override def beforeEach(): Unit = {
|
||||||
|
|||||||
+7
-1
@@ -266,7 +266,13 @@ class PerformVassalCommandsPhaseActionTest extends AnyFlatSpec with Matchers wit
|
|||||||
battalionTypes = battalionTypes,
|
battalionTypes = battalionTypes,
|
||||||
randomSeed = 1L,
|
randomSeed = 1L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val marchGameState = baseGameState(
|
private val marchGameState = baseGameState(
|
||||||
|
|||||||
+7
-1
@@ -43,7 +43,13 @@ class PrisonerExchangeActionTest extends AnyFlatSpec with Matchers {
|
|||||||
victor = None,
|
victor = None,
|
||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private def prisoner(heroId: Int, lastFactionId: Int): UnaffiliatedHeroC =
|
private def prisoner(heroId: Int, lastFactionId: Int): UnaffiliatedHeroC =
|
||||||
|
|||||||
+7
-1
@@ -205,7 +205,13 @@ class ProvinceConqueredActionTest extends AnyFlatSpec with Matchers {
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val currentDate = Date(year = 2024, month = Date.Month.July)
|
private val currentDate = Date(year = 2024, month = Date.Month.July)
|
||||||
|
|||||||
+7
-1
@@ -503,7 +503,13 @@ class ResolveBattleActionTest extends AnyFlatSpec with MockFactory with Matchers
|
|||||||
victor = None,
|
victor = None,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val startingGameStateWithAllies = startingGameState.copy(
|
private val startingGameStateWithAllies = startingGameState.copy(
|
||||||
|
|||||||
+7
-1
@@ -114,7 +114,13 @@ class TruceTurnBackPhaseActionTest extends AnyFlatSpec with Matchers {
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 1L,
|
randomSeed = 1L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
"results" should "advance to the next phase" in {
|
"results" should "advance to the next phase" in {
|
||||||
|
|||||||
+7
-1
@@ -109,7 +109,13 @@ class CapturedHeroMessagePromptGeneratorTest extends AnyFlatSpec with Matchers w
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
"execute message prompt" should "return an appropriate execute message" in {
|
"execute message prompt" should "return an appropriate execute message" in {
|
||||||
|
|||||||
+7
-1
@@ -82,7 +82,13 @@ class ChronicleUpdatePromptGeneratorTest extends AnyFlatSpec with BeforeAndAfter
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val mockClientTextStore = mock[ClientTextStore]
|
private val mockClientTextStore = mock[ClientTextStore]
|
||||||
|
|||||||
+7
-1
@@ -101,7 +101,13 @@ class DivineMessagePromptGeneratorTest extends AnyFlatSpec with Matchers with Mo
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
"generate" should "tell the LLM not to describe exile prisoner quests as releases" in {
|
"generate" should "tell the LLM not to describe exile prisoner quests as releases" in {
|
||||||
|
|||||||
+7
-1
@@ -58,7 +58,13 @@ class GeneratorUtilitiesTest extends AnyFlatSpec with Matchers with BeforeAndAft
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
val clientTextStore = mock[ClientTextStore]
|
val clientTextStore = mock[ClientTextStore]
|
||||||
GeneratorUtilities
|
GeneratorUtilities
|
||||||
|
|||||||
+7
-1
@@ -113,7 +113,13 @@ class QuestEndedGeneratorUtilitiesTest extends AnyFlatSpec with Matchers with Mo
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private def mockTextStore: ClientTextStore = {
|
private def mockTextStore: ClientTextStore = {
|
||||||
|
|||||||
@@ -226,7 +226,13 @@ class GameStateViewFilterTest extends AnyFlatSpec with BeforeAndAfterEach with M
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
"filteredGameState" should "return all provinces when there is no factionId" in {
|
"filteredGameState" should "return all provinces when there is no factionId" in {
|
||||||
|
|||||||
@@ -438,7 +438,13 @@ class ProvinceUtilsTest extends AnyFlatSpec with Matchers with BeforeAndAfterEac
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
"isFocusProvince" should "return true when the ruling faction has this province as its focus" in {
|
"isFocusProvince" should "return true when the ruling faction has this province as its focus" in {
|
||||||
|
|||||||
+7
-1
@@ -61,7 +61,13 @@ class AllianceOfferCommandSelectorTest extends AnyFlatSpec with Matchers with Be
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-1
@@ -89,7 +89,13 @@ class AlmsCommandSelectorTest extends AnyFlatSpec with Matchers with BeforeAndAf
|
|||||||
battalionTypes = battalionTypes,
|
battalionTypes = battalionTypes,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
"chosenAlmsCommand" should "give 1000 food if we need 10 support in December" in {
|
"chosenAlmsCommand" should "give 1000 food if we need 10 support in December" in {
|
||||||
|
|||||||
+7
-1
@@ -181,7 +181,13 @@ class AttackCommandChooserTest extends AnyFlatSpec with Matchers with BeforeAndA
|
|||||||
victor = None,
|
victor = None,
|
||||||
randomSeed = 12345L,
|
randomSeed = 12345L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val availableBattalionTypes = Vector(
|
private val availableBattalionTypes = Vector(
|
||||||
|
|||||||
+7
-1
@@ -97,7 +97,13 @@ class AttackDecisionCommandChooserTest extends AnyFlatSpec with Matchers with Be
|
|||||||
battalionTypes = battalionTypes,
|
battalionTypes = battalionTypes,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val defaultSupplies = Supplies(gold = 0, food = 0)
|
private val defaultSupplies = Supplies(gold = 0, food = 0)
|
||||||
|
|||||||
+7
-1
@@ -184,7 +184,13 @@ class CommandChoiceHelpersTest extends AnyFlatSpec with Matchers with BeforeAndA
|
|||||||
battalionTypes = battalionTypes,
|
battalionTypes = battalionTypes,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
behavior of "CommandChoiceHelpersTest"
|
behavior of "CommandChoiceHelpersTest"
|
||||||
|
|||||||
+7
-1
@@ -126,7 +126,13 @@ class ExpandCommandSelectorTest extends AnyFlatSpec with Matchers with BeforeAnd
|
|||||||
battalionTypes = battalionTypesVector,
|
battalionTypes = battalionTypesVector,
|
||||||
randomSeed = 1L,
|
randomSeed = 1L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
"heroIdsToMarch" should "never send a faction leader by themselves" in
|
"heroIdsToMarch" should "never send a faction leader by themselves" in
|
||||||
|
|||||||
+7
-1
@@ -83,7 +83,13 @@ class FulfillQuestsCommandSelectorTest extends AnyFlatSpec with Matchers with Be
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val gameState = makeGameState(
|
private val gameState = makeGameState(
|
||||||
|
|||||||
+7
-1
@@ -69,7 +69,13 @@ class ImproveCommandSelectorTest extends AnyFlatSpec with Matchers with BeforeAn
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val improveCommand = ImproveAvailable(
|
private val improveCommand = ImproveAvailable(
|
||||||
|
|||||||
+7
-1
@@ -61,7 +61,13 @@ class TruceOfferCommandSelectorTest extends AnyFlatSpec with Matchers with Befor
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-1
@@ -93,7 +93,13 @@ class AllianceQuestCommandChooserTest extends AnyFlatSpec with BeforeAndAfterEac
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 0L,
|
randomSeed = 0L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-1
@@ -101,7 +101,13 @@ class AlmsAcrossRealmQuestCommandChooserTest extends AnyFlatSpec with BeforeAndA
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 1L,
|
randomSeed = 1L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-1
@@ -81,7 +81,13 @@ class AlmsToProvinceQuestCommandChooserTest extends AnyFlatSpec with BeforeAndAf
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 1L,
|
randomSeed = 1L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-1
@@ -64,7 +64,13 @@ class ApprehendOutlawQuestCommandChooserTest extends AnyFlatSpec with Matchers {
|
|||||||
battalionTypes = Vector.empty,
|
battalionTypes = Vector.empty,
|
||||||
randomSeed = 1L,
|
randomSeed = 1L,
|
||||||
chronicleEntries = Vector.empty,
|
chronicleEntries = Vector.empty,
|
||||||
gameType = GameType.Normal
|
gameType = GameType.Normal,
|
||||||
|
eagleMap = net.eagle0.eagle.model.state.game_state.EagleMapInfo(
|
||||||
|
mapWidth = 0,
|
||||||
|
mapHeight = 0,
|
||||||
|
sha256 = "",
|
||||||
|
centroidsSha256 = ""
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user