 |
Minesweeper2
V1.1.1
Game in C++ by Górka Mateusz
|
Go to the documentation of this file.
46 { this->x += vec.
x; this->y += vec.
y;
return *
this; }
54 { this->x -= vec.
x; this->y -= vec.
y;
return *
this; }
87 {
return (vec.
x == this->x && vec.
y == this->y ); }
104 {
return abs(this->x-vec.
x)<2 && abs(this->y-vec.
y)<2; }
116 template<
typename T >
118 strm <<
"[" << vec.
x <<
"; " << vec.
y <<
"]";
2 dimension vector
Definition: Vector2D.hpp:9
Vector2D_t(const T &xx, const T &yy)
Construct a new Vector 2 D object.
Definition: Vector2D.hpp:20
Vector2D_t & operator-=(const Vector2D_t &vec)
Operator -=.
Definition: Vector2D.hpp:53
unsigned int area() const
Area of rectangle extened on the vector.
Definition: Vector2D.hpp:94
T x
X coordinate of vectior.
Definition: Vector2D.hpp:11
bool adj(const Vector2D_t &vec) const
Is points are adjoining?
Definition: Vector2D.hpp:103
Vector2D_t()
Construct a new Vector 2 D object.
Definition: Vector2D.hpp:25
std::ostream & operator<<(std::ostream &strm, const Vector2D_t< T > &vec)
Display operator.
Definition: Vector2D.hpp:117
Vector2D_t operator+(const Vector2D_t &vec) const
operator + v2
Definition: Vector2D.hpp:63
bool operator==(const Vector2D_t &vec) const
Operator ==.
Definition: Vector2D.hpp:86
~Vector2D_t()=default
Destroy the Vector 2 D object.
T y
Y coordinate of vectior.
Definition: Vector2D.hpp:12
Vector2D_t & operator+=(const Vector2D_t &vec)
Operator +=.
Definition: Vector2D.hpp:45
Vector2D_t(const Vector2D_t &vec)
Construct a new Vector 2 D object.
Definition: Vector2D.hpp:31
Vector2D_t< short int > Vector2D
Vector2D typedef.
Definition: Vector2D.hpp:126
Vector2D_t operator-(const Vector2D_t &vec) const
Operator -.
Definition: Vector2D.hpp:74