#ifndef SPELLSMANAGER_H
#define SPELLSMANAGER_H
#include <QObject>
#include <QString>
#include <QImage>

#include <vector>

#include "abstractfactory.h"
#include "effects/effect.h"
#include "spells/spell.h"

class SpellManager : public QObject
{
    Q_OBJECT
public:
    std::shared_ptr<Spell> createSpell(QString spell_name);
    std::shared_ptr<Effect> createEffect(QString effect_name);
    static SpellManager& getInstance(){
        static SpellManager instance;
        return instance;
    }
private:
    SpellManager();
    SpellManager(const SpellManager&) = delete;
    SpellManager &operator=(SpellManager&) = delete;
    ObjectFactory<Spell, QString> spells_factory_;
    ObjectFactory<Effect, QString> effects_factory_;
    std::vector<QString> available_spells_list_;
    std::vector<std::shared_ptr<Unit>> all_spells_list_;
};
#endif // SPELLSMANAGER_H
