mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-29 11:35:42 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58910afa1c |
@@ -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);
|
||||
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(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 vector<int8_t> attackerVC{
|
||||
const auto attackerVC = vector<int8_t>{
|
||||
net::eagle0::shardok::storage::fb::
|
||||
VictoryCondition_VICTORY_CONDITION_LAST_PLAYER_STANDING,
|
||||
net::eagle0::shardok::storage::fb::
|
||||
@@ -87,7 +87,7 @@ protected:
|
||||
1000,
|
||||
&attackerVC);
|
||||
|
||||
const vector<int8_t> defenderVC{
|
||||
const auto defenderVC = vector<int8_t>{
|
||||
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);
|
||||
|
||||
std::vector<Unit> units{
|
||||
auto units = std::vector<Unit>{
|
||||
AddGenericUnit(0, 0, attackerLocation),
|
||||
AddGenericUnit(1, 1, defenderLocation)};
|
||||
if (secondAttacker) { units.push_back(AddGenericUnit(0, 2, attacker2Location)); }
|
||||
|
||||
@@ -67,7 +67,7 @@ void EXPECT_CONTAINS(const VecT& vec, const T& obj) {
|
||||
|
||||
template<class VecT, class F>
|
||||
auto CHECK_NOCONTAINS_WHERE(const VecT& vec, F where) -> bool {
|
||||
for (size_t i = 0; i < vec.size(); i++) {
|
||||
for (size_t i = 0; i < vec.size(); ++i) {
|
||||
if (where(vec[i])) {
|
||||
std::cout << "Found at index " << i << '\n';
|
||||
return false;
|
||||
|
||||
@@ -18,7 +18,7 @@ TEST(PercentileRollOddsTests, singleStat_returnsExpected) {
|
||||
const std::vector<double> expectedBonuses =
|
||||
{-25.0, -12.8, -3.125, -0.2, 0.0, 0.2, 3.125, 12.8, 25.0, 28.1216};
|
||||
|
||||
for (size_t i = 0; i < stats.size(); i++) {
|
||||
for (size_t i = 0; i < stats.size(); ++i) {
|
||||
EXPECT_DOUBLE_EQ(expectedBonuses[i], BonusFromStat(stats[i]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ TEST_F(UnitTests, giveCasualties_raisesMorale) {
|
||||
}
|
||||
|
||||
TEST_F(UnitTests, Vigor_changesActionPoints) {
|
||||
for (int i = 1; i < 100; i++) {
|
||||
for (int i = 1; i < 100; ++i) {
|
||||
Unit ui1 = GetUnitT1();
|
||||
ui1.mutable_attached_hero().mutate_vigor(i);
|
||||
ui1.mutable_battalion().mutate_morale(50);
|
||||
@@ -115,7 +115,7 @@ TEST_F(UnitTests, MaxVigor_elevenActionPoints) {
|
||||
}
|
||||
|
||||
TEST_F(UnitTests, Morale_changesActionPoints) {
|
||||
for (int i = 1; i < 100; i++) {
|
||||
for (int i = 1; i < 100; ++i) {
|
||||
Unit ui1 = GetUnitT1();
|
||||
ui1.mutable_attached_hero().mutate_vigor(50);
|
||||
ui1.mutable_battalion().mutate_morale(i);
|
||||
|
||||
Reference in New Issue
Block a user