78 lines
1.7 KiB
C++
78 lines
1.7 KiB
C++
//
|
|
// Created by Louis Gallet on 15/01/2025.
|
|
//
|
|
|
|
#ifndef G990_H
|
|
#define G990_H
|
|
#include "Compteur.h"
|
|
|
|
|
|
class G990 {
|
|
private:
|
|
bool nord;
|
|
bool est;
|
|
long energiePhysique;
|
|
long energieMaximale;
|
|
long vision;
|
|
|
|
public:
|
|
G990(bool const nord, bool const est, long const energiePhysique, long const energieMaximale, long const vision) {
|
|
initialiser(nord, est, energiePhysique, energieMaximale, vision);
|
|
Compteur::ajouterConstructeur();
|
|
}
|
|
|
|
G990(const G990 &g990) {
|
|
initialiser(g990.nord, g990.est, g990.energiePhysique, g990.energieMaximale, g990.vision);
|
|
Compteur::ajouterConstructeurCopie();
|
|
}
|
|
|
|
~G990() {
|
|
Compteur::ajouterDestructeur();
|
|
}
|
|
void initialiser(bool nord, bool est, long energiePhysique, long energieMaximale, long vision);
|
|
void deplacementNordSud(int valeur, int& x, int& y) const;
|
|
void deplacementEstOuest(int valeur, int& x, int& y) const;
|
|
void regarderNord();
|
|
void regarderSud();
|
|
void regarderEst();
|
|
void regarderOuest();
|
|
void bloquer(int xAmi, int yAmi, int& x, int& y, int xEnnemi, int yEnnemi);
|
|
|
|
bool getNord() const {
|
|
return nord;
|
|
}
|
|
|
|
bool getEst() const {
|
|
return est;
|
|
}
|
|
|
|
long getEnergiePhysique() const {
|
|
return energiePhysique;
|
|
}
|
|
|
|
long getEnergieMaximale() const {
|
|
return energieMaximale;
|
|
}
|
|
|
|
long getVision() const {
|
|
return vision;
|
|
}
|
|
|
|
void setEnergiePhysique(long energiePhysique) {
|
|
this->energiePhysique = energiePhysique;
|
|
}
|
|
|
|
void setEnergieMaximale(long energieMaximale) {
|
|
this->energieMaximale = energieMaximale;
|
|
}
|
|
|
|
void setVision(long vision) {
|
|
this->vision = vision;
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //G990_H
|