57 lines
1.8 KiB
C++
57 lines
1.8 KiB
C++
#ifndef PKMNLIB_TESTLIBRARY_HPP
|
|
#define PKMNLIB_TESTLIBRARY_HPP
|
|
|
|
#include "../../src/Library/Moves/MoveLibrary.hpp"
|
|
#include "../../src/Library/PokemonLibrary.hpp"
|
|
class TestLibrary {
|
|
private:
|
|
static PkmnLib::Library::PokemonLibrary* _library;
|
|
|
|
public:
|
|
static PkmnLib::Library::PokemonLibrary* GetLibrary() {
|
|
if (_library == nullptr) {
|
|
_library = BuildLibrary();
|
|
}
|
|
return _library;
|
|
}
|
|
|
|
static PkmnLib::Library::PokemonLibrary* BuildLibrary() {
|
|
return new PkmnLib::Library::PokemonLibrary(CreatureLib::Library::LibrarySettings(100, 4),
|
|
BuildSpeciesLibrary(), BuildMoveLibrary(), BuildItemLibrary(),
|
|
BuildGrowthRateLibrary(), BuildTypeLibrary(), BuildNatureLibrary());
|
|
}
|
|
|
|
static PkmnLib::Library::SpeciesLibrary* BuildSpeciesLibrary() {
|
|
auto lib = new PkmnLib::Library::SpeciesLibrary();
|
|
return lib;
|
|
}
|
|
|
|
static PkmnLib::Library::MoveLibrary* BuildMoveLibrary() {
|
|
auto lib = new PkmnLib::Library::MoveLibrary();
|
|
return lib;
|
|
}
|
|
|
|
static PkmnLib::Library::ItemLibrary* BuildItemLibrary() {
|
|
auto lib = new PkmnLib::Library::ItemLibrary();
|
|
return lib;
|
|
}
|
|
|
|
static CreatureLib::Library::GrowthRateLibrary* BuildGrowthRateLibrary() {
|
|
auto lib = new CreatureLib::Library::GrowthRateLibrary();
|
|
return lib;
|
|
}
|
|
|
|
static CreatureLib::Library::TypeLibrary* BuildTypeLibrary() {
|
|
auto lib = new CreatureLib::Library::TypeLibrary();
|
|
return lib;
|
|
}
|
|
|
|
static PkmnLib::Library::NatureLibrary* BuildNatureLibrary() {
|
|
auto lib = new PkmnLib::Library::NatureLibrary();
|
|
return lib;
|
|
}
|
|
|
|
};
|
|
|
|
#endif // PKMNLIB_TESTLIBRARY_HPP
|