Compare commits

..
Author SHA1 Message Date
admin d1e96a47c6 Use direct vector declarations in AI score tests 2026-06-23 13:08:25 -07:00
5 changed files with 10 additions and 10 deletions
@@ -66,7 +66,7 @@ protected:
net::eagle0::shardok::storage::fb::DrawType_UNKNOWN_DRAW_TYPE);
endGameCondition.mutate_victory_details(
net::eagle0::shardok::storage::fb::VictoryCondition_UNKNOWN_VICTORY_CONDITION);
auto winningIdsVec = std::vector<PlayerId>{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
std::vector<PlayerId> winningIdsVec{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
auto winningIdsOff = fbb.CreateVector(winningIdsVec);
auto statusB = net::eagle0::shardok::storage::fb::GameStatusBuilder(fbb);
statusB.add_state(net::eagle0::shardok::storage::fb::GameStatus_::State_GAME_RUNNING);
@@ -75,7 +75,7 @@ protected:
net::eagle0::shardok::storage::fb::GameStatus_::State_GAME_RUNNING);
const auto mapOffset = AddHexMap(fbb, hexMap);
const auto attackerVC = vector<int8_t>{
const vector<int8_t> attackerVC{
net::eagle0::shardok::storage::fb::
VictoryCondition_VICTORY_CONDITION_LAST_PLAYER_STANDING,
net::eagle0::shardok::storage::fb::
@@ -87,7 +87,7 @@ protected:
1000,
&attackerVC);
const auto defenderVC = vector<int8_t>{
const vector<int8_t> defenderVC{
net::eagle0::shardok::storage::fb::
VictoryCondition_VICTORY_CONDITION_WIN_AFTER_MAX_ROUNDS,
net::eagle0::shardok::storage::fb::
@@ -33,7 +33,7 @@ protected:
defenderPlayer};
const auto playersOffset = fbb.CreateVectorOfSortedTables(&playersVec);
auto units = std::vector<Unit>{
std::vector<Unit> units{
AddGenericUnit(0, 0, attackerLocation),
AddGenericUnit(1, 1, defenderLocation)};
if (secondAttacker) { units.push_back(AddGenericUnit(0, 2, attacker2Location)); }
@@ -64,7 +64,7 @@ TEST_F(ExtinguishFireCommandTests, Execute_givesAgilityXp) {
actor->mutable_attached_hero().mutate_agility_xp(11);
actor->mutable_attached_hero().mutate_wisdom_xp(33);
std::vector<double> rolls{0.50};
auto rolls = std::vector<double>{0.50};
const auto generator = std::make_shared<SequenceRandomGenerator>(rolls);
const auto results = ExtinguishFireCommand(
@@ -83,7 +83,7 @@ TEST_F(ExtinguishFireCommandTests, Execute_givesAgilityXp) {
}
TEST_F(ExtinguishFireCommandTests, ExecuteLowRoll_extinguishesFire) {
std::vector<double> rolls{0.25};
auto rolls = std::vector<double>{0.25};
const auto generator = std::make_shared<SequenceRandomGenerator>(rolls);
GetMutableTerrain(hexMap, Coords(3, 3))->mutable_modifier().mutable_fire().mutate_present(true);
@@ -107,7 +107,7 @@ TEST_F(ExtinguishFireCommandTests, ExecuteLowRoll_extinguishesFire) {
}
TEST_F(ExtinguishFireCommandTests, ExecuteHighRoll_doesNotExtinguish) {
std::vector<double> rolls{0.75};
auto rolls = std::vector<double>{0.75};
const auto generator = std::make_shared<SequenceRandomGenerator>(rolls);
GetMutableTerrain(hexMap, Coords(3, 3))->mutable_modifier().mutable_fire().mutate_present(true);
@@ -129,7 +129,7 @@ TEST_F(ExtinguishFireCommandTests, ExecuteHighRoll_doesNotExtinguish) {
TEST_F(ExtinguishFireCommandTests, ExecuteHiddenActor_unhides) {
actor->mutate_hidden(true);
std::vector<double> rolls{0.75};
auto rolls = std::vector<double>{0.75};
const auto generator = std::make_shared<SequenceRandomGenerator>(rolls);
GetMutableTerrain(hexMap, Coords(3, 3))->mutable_modifier().mutable_fire().mutate_present(true);
@@ -58,7 +58,7 @@ public:
};
TEST_F(StartFireCommandTests, ExecuteLowRoll_startsFire) {
std::vector<double> rolls{0.25};
auto rolls = std::vector<double>{0.25};
const auto generator = std::make_shared<SequenceRandomGenerator>(rolls);
const auto results = StartFireCommand(
@@ -81,7 +81,7 @@ TEST_F(StartFireCommandTests, ExecuteLowRoll_startsFire) {
}
TEST_F(StartFireCommandTests, ExecuteHighRoll_doesNotStartFire) {
std::vector<double> rolls{0.75};
auto rolls = std::vector<double>{0.75};
const auto generator = std::make_shared<SequenceRandomGenerator>(rolls);
const auto results = StartFireCommand(