#ifndef WTEST_COMMAND_HPP_
#define WTEST_COMMAND_HPP_

#include <DevCommand/DevCommand.hpp>
#include <FileIO/FileIO.hpp>
#include <cstdint>

/**
 * @brief Command for testing the integrity of a world file.
 */
class WTestCommand final : public DevCommand
{
private:
    struct Region
    {
        uint64_t start;
        uint64_t size;
        std::string usage;
        bool bad;
    };

    static void testHashTable(FileIO &file, uint64_t pos, uint64_t size, std::string hashPath, std::vector<Region> &regions);

public:
    int execute(const std::vector<std::string> &args) override;
};

#endif