Lighter library with a rework on characteristics.
This commit is contained in:
parent
f412b1b997
commit
7e613ca2a0
10 changed files with 404 additions and 142 deletions
|
|
@ -1,18 +1,10 @@
|
|||
#ifndef BILLYSHEET_CHARACTER_SHEET_HPP
|
||||
#define BILLYSHEET_CHARACTER_SHEET_HPP
|
||||
|
||||
#include "characteristic/adresse.hpp"
|
||||
#include "characteristic/endurance.hpp"
|
||||
#include "characteristic/chance.hpp"
|
||||
#include "characteristic/habilete.hpp"
|
||||
#include "characteristic/characteristic.hpp"
|
||||
#include "billy_objects.hpp"
|
||||
#include <random>
|
||||
#include <unordered_set>
|
||||
|
||||
namespace gui {
|
||||
class Gui;
|
||||
}
|
||||
|
||||
namespace character {
|
||||
enum class classe : std::uint8_t {
|
||||
Guerrier = 0,
|
||||
|
|
@ -23,23 +15,20 @@ namespace character {
|
|||
|
||||
class CharacterSheet final {
|
||||
private:
|
||||
friend gui::Gui;
|
||||
|
||||
friend BillyObjects;
|
||||
|
||||
std::mt19937_64 engine{ std::random_device{ "rdseed" }() };
|
||||
|
||||
std::string caractere{};
|
||||
|
||||
//TODO: bad design pour les caractéristiques. Je dois trouver autre chose.
|
||||
|
||||
characteristic::Adresse adresse;
|
||||
characteristic::Characteristic adresse{ characteristic::characType::Adresse };
|
||||
|
||||
characteristic::Endurance endurance;
|
||||
characteristic::Characteristic endurance{ characteristic::characType::Endurance };
|
||||
|
||||
characteristic::Chance chance;
|
||||
characteristic::Characteristic chance{ characteristic::characType::Chance };
|
||||
|
||||
characteristic::Habilete habilete;
|
||||
characteristic::Characteristic habilete{ characteristic::characType::Habilete };
|
||||
|
||||
BillyObjects::container objects;
|
||||
|
||||
|
|
@ -80,13 +69,13 @@ namespace character {
|
|||
|
||||
[[nodiscard]] const std::string &get_caractere() const { return caractere; }
|
||||
|
||||
[[nodiscard]] const characteristic::Adresse &get_adresse() const { return adresse; }
|
||||
[[nodiscard]] const characteristic::Characteristic &get_adresse() const { return adresse; }
|
||||
|
||||
[[nodiscard]] const characteristic::Endurance &get_endurance() const { return endurance; }
|
||||
[[nodiscard]] const characteristic::Characteristic &get_endurance() const { return endurance; }
|
||||
|
||||
[[nodiscard]] const characteristic::Chance &get_chance() const { return chance; }
|
||||
[[nodiscard]] const characteristic::Characteristic &get_chance() const { return chance; }
|
||||
|
||||
[[nodiscard]] const characteristic::Habilete &get_habilete() const { return habilete; }
|
||||
[[nodiscard]] const characteristic::Characteristic &get_habilete() const { return habilete; }
|
||||
|
||||
[[nodiscard]] const BillyObjects::container &get_objects() const { return objects; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue