#pragma once

static const int DAS_MIN_VALUE = 0;  // the minimal selectable DAS value, equals to 0ms
static const int DAS_MAX_VALUE = 30; // the maximal selectable DAS value, equals to 500ms
static const int ARR_MIN_VALUE = 0;  // the minimal selectable ARR value, equals to 0ms
static const int ARR_MAX_VALUE = 30; // the maximal selectable ARR value, equals to 500ms
static const int SDR_MIN_VALUE = 0;  // the minimal selectable SDR value, equals to 0ms
static const int SDR_MAX_VALUE = 6;  // the maximal selectable SDR value, equals to 100ms


/**
 * The controls of a player
 */
class Player {
    private:
        int DAS; // Delayed Auto-Shift, goes from 0 (instant) to 30 (500ms)
        int ARR; // Auto-Repeat Rate, goes from 0 (instant) to 30 (500ms)
        int SDR; // Soft Drop Rate, goes from 0 (instant) to 6 (100ms)
    
    public:
        /**
         * Sets default controls
         */
        Player();

        /**
         * Try setting DAS to the desired value
         * @return If it is possible
         */
        bool setDAS(int DAS);

        /**
         * Try setting ARR to the desired value
         * @return If it is possible
         */
        bool setARR(int ARR);

        /**
         * Try setting SDR to the desired value
         * @return If it is possible
         */
        bool setSDR(int SDR);

        /**
         * @return DAS value
         */
        int getDAS() const;

        /**
         * @return ARR value
         */
        int getARR() const;

        /**
         * @return SDR value
         */
        int getSDR() const;
};
