Added lots of security using asserts.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -10,8 +10,10 @@ using namespace CreatureLib;
|
||||
using namespace CreatureLib::Battling;
|
||||
|
||||
TEST_CASE("Turn ordering: Attack before pass", "[Battling]") {
|
||||
auto lib = TestLibrary::Get();
|
||||
auto learnedAttack = LearnedAttack(lib->GetAttackLibrary()->Get("standard"_cnc), AttackLearnMethod::Unknown);
|
||||
auto choice1 = new PassTurnChoice(nullptr);
|
||||
auto choice2 = new AttackTurnChoice(nullptr, nullptr, CreatureIndex(0, 0));
|
||||
auto choice2 = new AttackTurnChoice(nullptr, &learnedAttack, CreatureIndex(0, 0));
|
||||
auto vec = std::vector<BaseTurnChoice*>{choice1, choice2};
|
||||
auto rand = Arbutils::Random();
|
||||
TurnOrdering::OrderChoices(vec, rand);
|
||||
|
||||
Reference in New Issue
Block a user