Compare commits

..
Author SHA1 Message Date
admin 811bfd970a Use direct fire roll vector declarations 2026-06-23 12:59:52 -07:00
7 changed files with 13 additions and 13 deletions
@@ -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);
auto rolls = std::vector<double>{0.50};
std::vector<double> rolls{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) {
auto rolls = std::vector<double>{0.25};
std::vector<double> rolls{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) {
auto rolls = std::vector<double>{0.75};
std::vector<double> rolls{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);
auto rolls = std::vector<double>{0.75};
std::vector<double> rolls{0.75};
const auto generator = std::make_shared<SequenceRandomGenerator>(rolls);
GetMutableTerrain(hexMap, Coords(3, 3))->mutable_modifier().mutable_fire().mutate_present(true);
@@ -46,7 +46,7 @@ class HolyWaveCommandTest : public ::testing::Test {
auto actorOff = AddGenericUnit(2, 0, Coords(2, 2));
auto otherOff1 = AddGenericUnit(2, 1, Coords(2, 3));
auto otherOff2 = AddGenericUnit(2, 2, Coords(2, 1));
vector<Unit> units{actorOff, otherOff1, otherOff2};
auto units = vector<Unit>{actorOff, otherOff1, otherOff2};
auto unitsOff = fbb.CreateVectorOfSortedStructs(&units);
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 defenderOff = AddGenericUnit(2, 1, Coords(2, 4));
vector<Unit> unitsVec{mageOff, defenderOff};
auto unitsVec = vector<Unit>{mageOff, defenderOff};
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
GameStateBuilder gsb(fbb);
@@ -26,7 +26,7 @@ class MoveCommandTest : public ::testing::Test {
fbb.ForceDefaults(true);
Unit movingUnitOff = AddGenericUnit(1, movingUnitId, startLocation);
vector<Unit> vec{movingUnitOff};
auto vec = vector<Unit>{movingUnitOff};
auto u = fbb.CreateVectorOfSortedStructs(&vec);
// 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::Unit& /*builder*/) { return; });
vector<Unit> vec2{movingUnitOff2, enemyRangerOff2};
auto vec2 = vector<Unit>{movingUnitOff2, enemyRangerOff2};
auto u2 = fbbWithRanger.CreateVectorOfSortedStructs(&vec2);
// 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));
vector<Unit> vec3{undeadUnit, otherUnit};
auto vec3 = vector<Unit>{undeadUnit, otherUnit};
auto u3 = fbbUndead.CreateVectorOfSortedStructs(&vec3);
// Copy the hex_map to the new FlatBuffer
@@ -28,7 +28,7 @@ class RaiseDeadCommandTest : public ::testing::Test {
auto actorOff = AddGenericUnit(5, 0, position);
auto otherOff = AddGenericUnit(6, 1, Coords(5, 5));
vector<Unit> unitsVec{actorOff, otherOff};
auto unitsVec = vector<Unit>{actorOff, otherOff};
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
auto mapOff = AddBasicMap(fbb);
@@ -28,7 +28,7 @@ class ScoutCommandTest : public ::testing::Test {
auto rangerOff = AddGenericUnit(5, 2, Coords(0, 0));
vector<Unit> unitsVec{opp1, opp2, rangerOff};
auto unitsVec = vector<Unit>{opp1, opp2, rangerOff};
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
auto mapOff = AddBasicMap(fbb);
@@ -58,7 +58,7 @@ public:
};
TEST_F(StartFireCommandTests, ExecuteLowRoll_startsFire) {
auto rolls = std::vector<double>{0.25};
std::vector<double> rolls{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) {
auto rolls = std::vector<double>{0.75};
std::vector<double> rolls{0.75};
const auto generator = std::make_shared<SequenceRandomGenerator>(rolls);
const auto results = StartFireCommand(