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