Move several classes from Core to Arbutils.
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:
@@ -6,7 +6,7 @@
|
||||
using namespace CreatureLib;
|
||||
using namespace Battling;
|
||||
|
||||
bool ___ChoiceOrderFunc(const BaseTurnChoice* a, const BaseTurnChoice* b, Core::Random& rand) {
|
||||
bool ___ChoiceOrderFunc(const BaseTurnChoice* a, const BaseTurnChoice* b, Arbutils::Random& rand) {
|
||||
auto aKind = a->GetKind();
|
||||
auto bKind = b->GetKind();
|
||||
if (aKind != bKind)
|
||||
@@ -26,7 +26,7 @@ bool ___ChoiceOrderFunc(const BaseTurnChoice* a, const BaseTurnChoice* b, Core::
|
||||
return randomValue == 0;
|
||||
}
|
||||
|
||||
void TurnOrdering::OrderChoices(std::vector<BaseTurnChoice*>& vec, Core::Random& rand) {
|
||||
void TurnOrdering::OrderChoices(std::vector<BaseTurnChoice*>& vec, Arbutils::Random& rand) {
|
||||
auto comp = [&](const BaseTurnChoice* a, const BaseTurnChoice* b) -> bool {
|
||||
return ___ChoiceOrderFunc(a, b, rand);
|
||||
};
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#ifndef CREATURELIB_TURNORDERING_HPP
|
||||
#define CREATURELIB_TURNORDERING_HPP
|
||||
|
||||
#include <Arbutils/Random.hpp>
|
||||
#include <vector>
|
||||
#include "../../Core/Random.hpp"
|
||||
#include "../TurnChoices/BaseTurnChoice.hpp"
|
||||
|
||||
namespace CreatureLib::Battling {
|
||||
class TurnOrdering {
|
||||
public:
|
||||
static void OrderChoices(std::vector<BaseTurnChoice*>& vec, CreatureLib::Core::Random& rand);
|
||||
static void OrderChoices(std::vector<BaseTurnChoice*>& vec, Arbutils::Random& rand);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user