// // Created by Louis Gallet on 15/01/2025. // #ifndef X212_H #define X212_H #include class X212 { private: std::string nom; int direction; int force; int vitesse; int vision; public: void initialiser(std::string nom, int direction, int force, int vitesse, int vision); int bloquer() const; void mouvement(int& x, int& y) const; void superCourse(int& x, int& y) const; void esquive(int& x, int& y, int xDanger, int yDanger); std::string getNom() { return this->nom; } int getDirection() const { return this->direction; } int getForce() const { return this->force; } int getVitesse() const { return this->vitesse; } int getVision() const { return this->vision; } void setNom(std::string nom) { this->nom = nom; } void setDirection(int direction) { if (direction < 0) { this->direction = 0; } else if (direction > 3) { this->direction = 3; } else { this->direction = direction; } } void setForce(int force) { this->force = force; } void setVitesse(int vitesse) { this->vitesse = vitesse; } void setVision(int vision) { this->vision = vision; } }; #endif //X212_H