Deuxieme commit

This commit is contained in:
YANNIS
2025-05-29 16:53:26 +02:00
parent 33c6f3ccff
commit bd9bc5e2e2
5 changed files with 14 additions and 14 deletions
+7 -2
View File
@@ -7,10 +7,15 @@ class Bomberman {
private:
Position _position;
unsigned short _numberOfBombs;
unsigned short _maxNumberOfBombs = 1;
unsigned short _numberOfBombsPlanted = 0;
Bomb _bomb;
public:
Bomberman(){std::cout << "Bomberman created!" << std::endl;}
Bomberman(const Position &position, unsigned short numberOfBombs);
~Bomberman(){std::cout << "Bomberman destroyed!" << std::endl;};
int plantBomb();
friend std::ostream& operator<<(std::ostream &os, const Bomberman &bomberman) {
os << "Bomberman at " << bomberman._position << ", Number of bombs: " << bomberman._numberOfBombs;
return os;
}
};