AlpacaLibary  1.63
A closed source C++ bot for OSRS
Tile.hpp
Go to the documentation of this file.
1 #ifndef TILE_HPP_INCLUDED
2 #define TILE_HPP_INCLUDED
3 
4 #include <iostream>
5 #include <cstdint>
6 
7 class Tile
8 {
9  public:
10  Tile();
16  Tile(std::int32_t X, std::int32_t Y, std::int32_t Plane = 0);
17  Tile(const Tile& T);
18 
19  std::int32_t X;
20  std::int32_t Y;
21  std::int32_t Plane;
22 
23  double DistanceFrom(const Tile& T) const;
24 
25  bool IsNegative() const;
26  bool IsPositive() const;
27 
28  bool operator==(const Tile& T) const;
29  bool operator!=(const Tile& T) const;
30  Tile operator+(const Tile& T) const;
31  Tile operator-(const Tile& T) const;
32  Tile& operator+=(const Tile& T);
33  Tile& operator-=(const Tile& T);
34 
35  operator bool() const;
36  friend std::ostream& operator<<(std::ostream& OS, const Tile& T);
37 
38  ~Tile();
39 };
40 
41 #endif // TILE_HPP_INCLUDED
Definition: Tile.hpp:8
Tile & operator-=(const Tile &T)
Subtracts the x-axis and y-axis coordinates, plane is ignored.
std::int32_t Y
The y-axis coordinate.
Definition: Tile.hpp:20
friend std::ostream & operator<<(std::ostream &OS, const Tile &T)
double DistanceFrom(const Tile &T) const
bool operator!=(const Tile &T) const
std::int32_t X
The x-axis coordinate.
Definition: Tile.hpp:19
bool IsNegative() const
Tile(const Tile &T)
std::int32_t Plane
The plane the tile exists on (usually 0-4)
Definition: Tile.hpp:21
Tile(std::int32_t X, std::int32_t Y, std::int32_t Plane=0)
bool operator==(const Tile &T) const
Tile operator+(const Tile &T) const
Adds the x-axis and y-axis coordinates, plane is ignored.
Tile & operator+=(const Tile &T)
Adds the x-axis and y-axis coordinates, plane is ignored.
Tile operator-(const Tile &T) const
Subtracts the x-axis and y-axis coordinates, plane is ignored.
bool IsPositive() const