first commit

This commit is contained in:
YANNIS
2025-05-29 16:06:07 +02:00
commit 33c6f3ccff
6 changed files with 102 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
//Bomb.hpp
#pragma once
#include "Position.hpp"
#include <iostream>
class Bomb {
private:
Position _position;
unsigned short _timer;
bool _active;
public:
Bomb(): _position({0, 0}), _timer(3), _active(false) {
std::cout << "Bomb created at default position " << std::endl;
};
Bomb(Position position) : _position(position), _timer(3), _active(false) {
std::cout << "Bomb created at " << position << std::endl;
}
void activate() { _active = true; }
void deactivate() { _active = false; }
bool isActive() const { return _active; }
void setPosition(Position position) { _position = position; }
Position getPosition() const { return _position; }
unsigned short getTimer() const { return _timer; }
};