mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-29 07:15:58 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3e62d4fd4 |
@@ -49,7 +49,7 @@ auto AddPlayerInfo(
|
||||
-> flatbuffers::Offset<net::eagle0::shardok::storage::fb::PlayerInfo> {
|
||||
const auto victoryConditionsOffset = fbb.CreateVector(victoryConditions);
|
||||
|
||||
auto alliesVec = std::vector<net::eagle0::shardok::storage::fb::AlliedPlayer>();
|
||||
std::vector<net::eagle0::shardok::storage::fb::AlliedPlayer> alliesVec;
|
||||
for (int pid : allyPids) { alliesVec.emplace_back(pid); }
|
||||
const auto alliesOffset = fbb.CreateVectorOfStructs(alliesVec);
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ static auto GameWithUnitTs(
|
||||
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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -32,7 +32,7 @@ class HexMapUtilsTest : public ::testing::Test {
|
||||
auto enemyUnitOffset = AddGenericUnit(enemyPlayerId, 2, Coords(1, 1));
|
||||
auto hiddenEnemyOffset = AddGenericUnit(enemyPlayerId, 3, Coords(1, 2));
|
||||
|
||||
auto unitsVec = std::vector<Unit>{
|
||||
std::vector<Unit> unitsVec{
|
||||
ownUnitOffset,
|
||||
alliedUnitOffset,
|
||||
enemyUnitOffset,
|
||||
|
||||
Reference in New Issue
Block a user