//
// Created by Louis Gallet on 15/01/2025.
//

#ifndef R234_H
#define R234_H



class R234 {
private:
    int direction;
    int strength;
    int speed;
    int range;

public:
    void initialiser(int direction, int strength, int speed, int range);
    int doAttack(int defenceEnemy) const;
    int doProtect(int attackEnemy) const;
    void doMove(int& x, int& y) const;
    void doRotateLeft();
    void doRotateRight();

    int getDirection() const {
        return direction;
    }

    int getStrength() const {
        return strength;
    }

    int getSpeed() const {
        return speed;
    }

    int getRange() const {
        return range;
    }

    void setDirection(int direction) {
        if (direction < 0) {
            this->direction = 0;
        }
        else if (direction > 3) {
            this->direction = 3;
        } else {
            this->direction = direction;
        }
    }
    void setStrength(int strength) {
        this->strength = strength;
    }

    void setSpeed(int speed) {
        this->speed = speed;
    }

    void setRange(int range) {
        this->range = range;
    }

};



#endif //R234_H