Remove creature classes from Library lib, merged with Battling lib.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
#ifdef TESTS_BUILD
|
||||
#include "../../extern/catch.hpp"
|
||||
#include "../../src/Battling/Library/BattleLibrary.hpp"
|
||||
#include "../../src/Library/SpeciesLibrary.hpp"
|
||||
#include "../../src/Library/AttackLibrary.hpp"
|
||||
#include "../../src/Library/ItemLibrary.hpp"
|
||||
#include "../../src/Library/GrowthRates/GrowthRateLibrary.hpp"
|
||||
#include "../../src/Library/DataLibrary.hpp"
|
||||
|
||||
using namespace CreatureLib::Core;
|
||||
using namespace CreatureLib::Library;
|
||||
static DataLibrary* __library = nullptr;
|
||||
using namespace CreatureLib::Battling;
|
||||
static BattleLibrary* __library = nullptr;
|
||||
|
||||
static SpeciesLibrary* BuildSpeciesLibrary(){
|
||||
auto l = new SpeciesLibrary();
|
||||
@@ -33,14 +39,15 @@ static GrowthRateLibrary* BuildGrowthRateLibrary(){
|
||||
}
|
||||
|
||||
|
||||
static DataLibrary* BuildLibrary(){
|
||||
static BattleLibrary* BuildLibrary(){
|
||||
auto l = new DataLibrary(LibrarySettings(100, 4), BuildSpeciesLibrary(), BuildAttackLibrary(),
|
||||
BuildItemLibrary(), BuildGrowthRateLibrary());
|
||||
return l;
|
||||
auto battleLib = new BattleLibrary(l, new BattleStatCalculator());
|
||||
return battleLib;
|
||||
}
|
||||
|
||||
[[maybe_unused]]
|
||||
static DataLibrary* GetLibrary(){
|
||||
static BattleLibrary* GetLibrary(){
|
||||
if (__library == nullptr){
|
||||
__library = BuildLibrary();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user