73 lines
1.3 KiB
C++
73 lines
1.3 KiB
C++
//
|
|
// Created by Louis Gallet on 17/01/2025.
|
|
//
|
|
|
|
#ifndef W000_H
|
|
#define W000_H
|
|
#include <string>
|
|
|
|
|
|
class W000 {
|
|
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);
|
|
void bloquer(int xAmi, int yAmi, int& x, int& y, int xEnnemi, int yEnnemi);
|
|
void bouger(int& x, int& y) const;
|
|
|
|
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 //W000_H
|