#ifndef GAME_STATE_H
#define GAME_STATE_H

#include <string>
#include <SDL2/SDL.h>

class GameState {
protected:
    std::string nextStateName;

public:
    virtual ~GameState() = default;

    virtual void init() = 0;
    virtual void handleEvents(SDL_Event& event) = 0;
    virtual void update() = 0;
    virtual void render(SDL_Renderer* renderer) = 0;

    void changeRoom(const std::string& stateName) {
        nextStateName = stateName;
    }

    std::string getNextState() const {
        return nextStateName;
    }

    void clearNextState() {
        nextStateName.clear();
    }
};

#endif
