From 1563ae5be6bc130a9b3a23464f7e28fdb1e87da3 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sat, 13 May 2017 19:01:56 +0500 Subject: 2017-05-13 --- code/PositionI.hpp | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 code/PositionI.hpp (limited to 'code/PositionI.hpp') diff --git a/code/PositionI.hpp b/code/PositionI.hpp new file mode 100644 index 0000000..25455ef --- /dev/null +++ b/code/PositionI.hpp @@ -0,0 +1,50 @@ +#pragma once + +#include + +class PositionI { +public: + PositionI(int x, int z, int y); + + PositionI(); + + ~PositionI(); + + int GetX() const; + + int GetY() const; + + int GetZ() const; + + void SetX(int x); + + void SetY(int y); + + void setZ(int z); + + double GetDistance(); + + bool operator==(const PositionI &other) const; + + PositionI &operator=(const PositionI &other); + + PositionI(const PositionI &other); + + bool operator<(const PositionI &rhs) const; + + bool operator>(const PositionI &rhs) const; + + bool operator<=(const PositionI &rhs) const; + + bool operator>=(const PositionI &rhs) const; + + PositionI operator-(const PositionI &other)const; + PositionI operator*(int other)const; + PositionI operator*(const PositionI &other)const; + PositionI operator/(int other)const; + + friend std::ostream &operator<<(std::ostream &os, const PositionI &i); + +private: + int m_x, m_y, m_z; +}; \ No newline at end of file -- cgit v1.2.3