81 lines
1.4 KiB
C++
81 lines
1.4 KiB
C++
//
|
|
// Created by Louis Gallet on 15/01/2025.
|
|
//
|
|
|
|
#ifndef X215_H
|
|
#define X215_H
|
|
#include <string>
|
|
|
|
|
|
class X215 {
|
|
private:
|
|
std::string nom;
|
|
int direction;
|
|
int force;
|
|
int vitesse;
|
|
int vision;
|
|
bool rageCombat;
|
|
|
|
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);
|
|
void tournerLesTalons();
|
|
|
|
void exploserRage();
|
|
void controlerRage();
|
|
|
|
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 //X215_H
|