#pragma once

#include <vector>
#include <SFML/Graphics.hpp>


class PlayerCursor {
    private:
        std::vector<unsigned int> rows;
        sf::Vector2u position;
        int leftDAS;
        int rightDAS;
        int upDAS;
        int downDAS;

    public:
        PlayerCursor(std::vector<unsigned int> rows);

        void updatePosition();

        bool movedLeft() const;

        bool movedRight() const;

        bool movedUp() const;

        bool movedDown() const;

        void goToPosition(const sf::Vector2u& newPosition);

        bool addPosition(unsigned int x, unsigned int y);

        bool removePosition(unsigned int x, unsigned int y);

        bool addRow(unsigned int position, unsigned int width);

        bool removeRow(unsigned int position);

        const sf::Vector2u& getPosition() const;
    
    private:
        bool shouldMove(int DAS) const;

        void moveLeft();

        void moveRight();

        void moveUp();

        void moveDown();
};
