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
+19
View File
@@ -0,0 +1,19 @@
//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;
}
};