Files
bomberman/Bomberman.hpp
T
2025-05-29 16:53:26 +02:00

22 lines
607 B
C++

// Bomberman.hpp
#pragma once
#include <iostream>
#include "Position.hpp"
#include "Bomb.hpp"
class Bomberman {
private:
Position _position;
unsigned short _maxNumberOfBombs = 1;
unsigned short _numberOfBombsPlanted = 0;
Bomb _bomb;
public:
Bomberman(){std::cout << "Bomberman created!" << std::endl;}
~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;
}
};