mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-29 09:55:41 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9ebaf516f |
@@ -49,7 +49,7 @@ auto AddPlayerInfo(
|
||||
-> flatbuffers::Offset<net::eagle0::shardok::storage::fb::PlayerInfo> {
|
||||
const auto victoryConditionsOffset = fbb.CreateVector(victoryConditions);
|
||||
|
||||
std::vector<net::eagle0::shardok::storage::fb::AlliedPlayer> alliesVec;
|
||||
auto alliesVec = std::vector<net::eagle0::shardok::storage::fb::AlliedPlayer>();
|
||||
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);
|
||||
|
||||
std::vector<PlayerId> winningIdsVec{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
|
||||
auto winningIdsVec = std::vector<PlayerId>{-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(
|
||||
|
||||
@@ -34,7 +34,7 @@ TEST_F(FallIntoWaterActionTests, takesDamage) {
|
||||
Coords c{2, 2};
|
||||
auto fallerOffset = AddGenericUnit(1, 0, c);
|
||||
|
||||
auto unitsVec = std::vector<Unit>{fallerOffset};
|
||||
std::vector<Unit> unitsVec{fallerOffset};
|
||||
auto unitsOffset = fbb.CreateVectorOfSortedStructs(&unitsVec);
|
||||
|
||||
net::eagle0::shardok::storage::fb::Weather weather;
|
||||
@@ -77,7 +77,7 @@ TEST_F(FallIntoWaterActionTests, highRoll_sweptAway) {
|
||||
Coords c{2, 2};
|
||||
auto fallerOffset = AddGenericUnit(1, 0, c);
|
||||
|
||||
auto unitsVec = std::vector<Unit>{fallerOffset};
|
||||
std::vector<Unit> unitsVec{fallerOffset};
|
||||
auto unitsOffset = fbb.CreateVectorOfSortedStructs(&unitsVec);
|
||||
|
||||
net::eagle0::shardok::storage::fb::Weather weather;
|
||||
@@ -121,7 +121,7 @@ TEST_F(FallIntoWaterActionTests, lowRoll_escapes) {
|
||||
Coords c{2, 2};
|
||||
auto fallerOffset = AddGenericUnit(1, 0, c);
|
||||
|
||||
auto unitsVec = std::vector<Unit>{fallerOffset};
|
||||
std::vector<Unit> unitsVec{fallerOffset};
|
||||
auto unitsOffset = fbb.CreateVectorOfSortedStructs(&unitsVec);
|
||||
|
||||
net::eagle0::shardok::storage::fb::Weather weather;
|
||||
@@ -170,7 +170,7 @@ TEST_F(FallIntoWaterActionTests, noHero_alwaysSweptAway) {
|
||||
unit.mutable_location() = c;
|
||||
unit.mutable_battalion().mutate_size(500);
|
||||
|
||||
auto unitsVec = std::vector<Unit>{unit};
|
||||
std::vector<Unit> unitsVec{unit};
|
||||
auto unitsOffset = fbb.CreateVectorOfSortedStructs(&unitsVec);
|
||||
|
||||
net::eagle0::shardok::storage::fb::Weather weather;
|
||||
|
||||
@@ -53,7 +53,7 @@ class MeteorCastActionTests : public ::testing::Test {
|
||||
|
||||
auto otherOffset = AddGenericUnit(1, 1, Coords(1, 1));
|
||||
|
||||
auto unitsVec = std::vector<Unit>{casterOffset, otherOffset};
|
||||
std::vector<Unit> unitsVec{casterOffset, otherOffset};
|
||||
auto unitsOffset = fbb.CreateVectorOfSortedStructs(&unitsVec);
|
||||
|
||||
auto hexMap = AddHexMap(fbb, BASIC_MAP_FB);
|
||||
|
||||
@@ -104,7 +104,7 @@ auto MakeGameState() -> GameStateW {
|
||||
ub.mutable_location() = coords;
|
||||
ub.mutate_status(net::eagle0::shardok::storage::fb::UnitStatus_NORMAL_UNIT);
|
||||
|
||||
auto unitsVec = std::vector<Unit>{ub};
|
||||
std::vector<Unit> unitsVec{ub};
|
||||
auto unitsOffset = fbb.CreateVectorOfSortedStructs(&unitsVec);
|
||||
|
||||
auto weather = net::eagle0::shardok::storage::fb::Weather(
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ class PerformUndeadCommandsActionTest : public ::testing::Test {
|
||||
auto undeadOff = AddGenericUndead(UNCONTROLLED_PLAYER_ID, 1, undeadPosition);
|
||||
auto targetedOff = AddGenericUnit(4, 2, Coords(5, 5));
|
||||
|
||||
auto unitsVec = std::vector<Unit>{adjOff, undeadOff, targetedOff};
|
||||
std::vector<Unit> unitsVec{adjOff, undeadOff, targetedOff};
|
||||
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
|
||||
|
||||
auto mapOff = AddBasicMap(fbb);
|
||||
|
||||
@@ -22,7 +22,7 @@ class PlaceHiddenUnitCommandTest : public ::testing::Test {
|
||||
|
||||
auto actorOff = AddGenericUnit(0, 0, Coords(-1, -1));
|
||||
|
||||
auto unitsVec = std::vector<Unit>{actorOff};
|
||||
std::vector<Unit> unitsVec{actorOff};
|
||||
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
|
||||
|
||||
auto hexMapOffset = AddHexMap(fbb, BASIC_MAP_FB);
|
||||
|
||||
@@ -21,7 +21,7 @@ class UndeadChangeAction_test : public ::testing::Test {
|
||||
auto firstUndeadOff = AddGenericUndead(1, 1, Coords(4, 4));
|
||||
auto secondUndeadOff = AddGenericUndead(2, 2, Coords(1, 1));
|
||||
|
||||
auto unitsVec = vector<Unit>{otherUnit, firstUndeadOff, secondUndeadOff};
|
||||
vector<Unit> unitsVec{otherUnit, firstUndeadOff, secondUndeadOff};
|
||||
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
|
||||
|
||||
GameStateBuilder gsb(fbb);
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ class UpdateOpponentKnowledgeActionTests : public ::testing::Test {
|
||||
|
||||
auto attackerOff = AddGenericUnit(0, 0, attackerPosition);
|
||||
auto defenderOff = AddGenericUnit(1, 1, notAdjacentPosition);
|
||||
auto unitsVec = vector<Unit>{attackerOff, defenderOff};
|
||||
vector<Unit> unitsVec{attackerOff, defenderOff};
|
||||
auto unitsOffset = fbb.CreateVectorOfSortedStructs(&unitsVec);
|
||||
|
||||
auto statusBuilder = net::eagle0::shardok::storage::fb::GameStatusBuilder(fbb);
|
||||
|
||||
@@ -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));
|
||||
|
||||
std::vector<Unit> unitsVec{
|
||||
auto unitsVec = std::vector<Unit>{
|
||||
ownUnitOffset,
|
||||
alliedUnitOffset,
|
||||
enemyUnitOffset,
|
||||
|
||||
Reference in New Issue
Block a user