ToyGameConfigParser.h 775 Bytes
//
//  ToyGameConfigParser.h
//  SteveAndMaggieGame
//
//  Created by Katarzyna Kalinowska-Górska on 07/05/2019.
//

#ifndef ToyGameConfigParser_h
#define ToyGameConfigParser_h

#include <stdio.h>
#include "ToySubGameScene.h"
#include "json/document.h"

class ToyGameConfigParser : public ToySubGameScene::GameCreator {
    
public:
    
    ToyGameConfigParser(std::string configFilePath);
    virtual ~ToyGameConfigParser();
    virtual ToySubGameScene* createGameScene(int gameId, std::string layoutFilePath) override;
    
protected:
    
    rapidjson::Document* _configJson;
    
    virtual std::string parseGameType();
    virtual ToySubGameScene* createGameScene(int gameId, std::string gameType, std::string layoutFilePath);
};

#endif /* ToyGameConfigParser_h */