Files
bomberman/Position.hpp
T
2025-05-29 16:06:07 +02:00

20 lines
417 B
C++

//Position.hpp
#pragma once
#include <iostream>
class Position {
private:
int _x;
int _y;
public:
Position() : _x(0), _y(0) {}
~Position() {}
Position(int x, int y) : _x(x), _y(y) {}
int getX() const { return _x; }
int getY() const { return _y; }
friend std::ostream& operator<<(std::ostream& os, const Position& pos) {
os << "Position(" << pos._x << ", " << pos._y << ")";
return os;
}
};