Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
@@ -17,11 +17,11 @@ TEST_CASE("Turn ordering: Attack before pass", "[Battling]") {
|
||||
auto choice2 = std::make_shared<AttackTurnChoice>(nullptr, &learnedAttack, CreatureIndex(0, 0));
|
||||
auto vec = std::vector<std::shared_ptr<BaseTurnChoice>>{choice1, choice2};
|
||||
auto rand = ArbUt::Random();
|
||||
TurnOrdering::OrderChoices(vec, rand);
|
||||
TurnOrdering::OrderChoices(vec);
|
||||
CHECK(vec[0] == choice2);
|
||||
CHECK(vec[1] == choice1);
|
||||
vec = std::vector<std::shared_ptr<BaseTurnChoice>>{choice2, choice1};
|
||||
TurnOrdering::OrderChoices(vec, rand);
|
||||
TurnOrdering::OrderChoices(vec);
|
||||
CHECK(vec[0] == choice2);
|
||||
CHECK(vec[1] == choice1);
|
||||
}
|
||||
@@ -34,11 +34,11 @@ TEST_CASE("Turn ordering: High priority goes before no priority", "[Battling]")
|
||||
auto choice2 = std::make_shared<AttackTurnChoice>(nullptr, a2, CreatureIndex(0, 0));
|
||||
auto vec = std::vector<std::shared_ptr<BaseTurnChoice>>{choice1, choice2};
|
||||
auto rand = ArbUt::Random();
|
||||
TurnOrdering::OrderChoices(vec, rand);
|
||||
TurnOrdering::OrderChoices(vec);
|
||||
CHECK(vec[0] == choice2);
|
||||
CHECK(vec[1] == choice1);
|
||||
vec = std::vector<std::shared_ptr<BaseTurnChoice>>{choice2, choice1};
|
||||
TurnOrdering::OrderChoices(vec, rand);
|
||||
TurnOrdering::OrderChoices(vec);
|
||||
CHECK(vec[0] == choice2);
|
||||
CHECK(vec[1] == choice1);
|
||||
|
||||
@@ -54,11 +54,11 @@ TEST_CASE("Turn ordering: Higher priority goes before high priority", "[Battling
|
||||
auto choice2 = std::make_shared<AttackTurnChoice>(nullptr, a2, CreatureIndex(0, 0));
|
||||
auto vec = std::vector<std::shared_ptr<BaseTurnChoice>>{choice1, choice2};
|
||||
auto rand = ArbUt::Random();
|
||||
TurnOrdering::OrderChoices(vec, rand);
|
||||
TurnOrdering::OrderChoices(vec);
|
||||
CHECK(vec[0] == choice2);
|
||||
CHECK(vec[1] == choice1);
|
||||
vec = std::vector<std::shared_ptr<BaseTurnChoice>>{choice2, choice1};
|
||||
TurnOrdering::OrderChoices(vec, rand);
|
||||
TurnOrdering::OrderChoices(vec);
|
||||
CHECK(vec[0] == choice2);
|
||||
CHECK(vec[1] == choice1);
|
||||
delete a1;
|
||||
@@ -73,11 +73,11 @@ TEST_CASE("Turn ordering: High priority goes before low priority", "[Battling]")
|
||||
auto choice2 = std::make_shared<AttackTurnChoice>(nullptr, a2, CreatureIndex(0, 0));
|
||||
auto vec = std::vector<std::shared_ptr<BaseTurnChoice>>{choice1, choice2};
|
||||
auto rand = ArbUt::Random();
|
||||
TurnOrdering::OrderChoices(vec, rand);
|
||||
TurnOrdering::OrderChoices(vec);
|
||||
CHECK(vec[0] == choice2);
|
||||
CHECK(vec[1] == choice1);
|
||||
vec = std::vector<std::shared_ptr<BaseTurnChoice>>{choice2, choice1};
|
||||
TurnOrdering::OrderChoices(vec, rand);
|
||||
TurnOrdering::OrderChoices(vec);
|
||||
CHECK(vec[0] == choice2);
|
||||
CHECK(vec[1] == choice1);
|
||||
|
||||
@@ -93,11 +93,11 @@ TEST_CASE("Turn ordering: No priority goes before low priority", "[Battling]") {
|
||||
auto choice2 = std::make_shared<AttackTurnChoice>(nullptr, a2, CreatureIndex(0, 0));
|
||||
auto vec = std::vector<std::shared_ptr<BaseTurnChoice>>{choice1, choice2};
|
||||
auto rand = ArbUt::Random();
|
||||
TurnOrdering::OrderChoices(vec, rand);
|
||||
TurnOrdering::OrderChoices(vec);
|
||||
CHECK(vec[0] == choice2);
|
||||
CHECK(vec[1] == choice1);
|
||||
vec = std::vector<std::shared_ptr<BaseTurnChoice>>{choice2, choice1};
|
||||
TurnOrdering::OrderChoices(vec, rand);
|
||||
TurnOrdering::OrderChoices(vec);
|
||||
CHECK(vec[0] == choice2);
|
||||
CHECK(vec[1] == choice1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user