Deuxieme commit
This commit is contained in:
+7
-2
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user