#pragma once
#include <array>

class GravityManager {
public:
    GravityManager();

    // Global multiplier applied to all levels
    void setGlobalMultiplier(double m);
    double getGlobalMultiplier() const;

    // Per-level multiplier (29 = 29+)
    void setLevelMultiplier(int level, double m);
    double getLevelMultiplier(int level) const;

    // Compute ms per cell and fps for a given level
    double getMsForLevel(int level) const;
    double getFpsForLevel(int level) const;

private:
    static constexpr double LEVEL_SPEEDS_MS[20] = {
        1000.0, 920.0, 840.0, 760.0, 680.0, 600.0, 520.0, 440.0, 360.0, 280.0,
        200.0,  160.0, 160.0, 120.0, 120.0, 100.0, 100.0, 80.0,  80.0,  60.0
    };

    double globalMultiplier{1.0};
    std::array<double,20> levelMultipliers{}; // default 1.0
};
