20 lines
589 B
C++
20 lines
589 B
C++
#ifndef CREATURELIB_GROWTHRATELIBRARY_HPP
|
|
#define CREATURELIB_GROWTHRATELIBRARY_HPP
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <unordered_map>
|
|
#include "GrowthRate.hpp"
|
|
|
|
namespace CreatureLib::Library{
|
|
class GrowthRateLibrary {
|
|
private:
|
|
std::unordered_map<std::string, GrowthRate*> _growthRates;
|
|
public:
|
|
[[nodiscard]] uint8_t CalculateLevel(const std::string& growthRate, uint32_t experience) const;
|
|
[[nodiscard]] uint32_t CalculateExperience(const std::string& growthRate, uint8_t level) const;
|
|
};
|
|
}
|
|
|
|
#endif //CREATURELIB_GROWTHRATELIBRARY_HPP
|