#ifndef SINGLE_PLAYER_WORLD_HPP_
#define SINGLE_PLAYER_WORLD_HPP_

#include <World/LocalWorld/LocalWorld.hpp>

/**
 * @brief Represents a singleplayer world.
 */
class SinglePlayerWorld final : public LocalWorld
{
private:
    std::shared_ptr<Player> thePlayer;

public:
    /**
     * @brief Construct a singleplayer world.
     * 
     * @param worldPath Path to the `.voxelverse` file.
     */
    SinglePlayerWorld(std::string worldPath);

    /**
     * @brief Get the player.
     */
    std::shared_ptr<Player> getThePlayer();

    virtual void fastUpdate(ChunkWindow *chunkWindow) override;
    virtual void sendMessageToEntity(uint64_t id, const void *msg, size_t size) override;
    virtual void sendCreateEntityMessageToClients(std::shared_ptr<Entity> entity) override;
    virtual void sendDeleteEntityMessageToClients(uint64_t id) override;
    virtual void onPlayerUpdateOver(Player &player) override;
    virtual void drawBlockSelector(GraphicsContext &context, WorldDisplay &worldDisplay, Player &player) override;
    virtual void onPlayerMessage(Player &player, const void *msg, size_t size) override;
    virtual void playSound(Sound &sound, glm::ivec3 blockPos, glm::vec3 vel) override;
    virtual void close() override;
    virtual std::shared_ptr<Player> getPlayer(const std::string &userName) override;
};

#endif