#ifndef TILE_HPP_INCLUDED
#define TILE_HPP_INCLUDED

#include <iostream>
#include <cstdint>

class Tile
{
    public:
        Tile();
        /*!
         * @param X The X-axis coordinate
         * @param Y The Y-axis coordinate
         * @param Plane The plane the tile exists on (usually 0-4)
        */
        Tile(std::int32_t X, std::int32_t Y, std::int32_t Plane = 0);
        Tile(const Tile& T);

        std::int32_t X; //!< The x-axis coordinate
        std::int32_t Y; //!< The y-axis coordinate
        std::int32_t Plane; //!< The plane the tile exists on (usually 0-4)

        double DistanceFrom(const Tile& T) const;

        bool IsNegative() const; //!< @returns True if any of x, y, or plane are negative in value
        bool IsPositive() const; //!< @returns True if all of x, y, and plane are positive in value

        bool operator==(const Tile& T) const; //!< @returns True if the comparative tile x, y, and plane are all equal
        bool operator!=(const Tile& T) const; //!< @returns True if any of the comparative tile x, y, or plane are not equal
        Tile operator+(const Tile& T) const; //!< 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
        Tile& operator+=(const Tile& T); //!< Adds the x-axis and y-axis coordinates, plane is ignored
        Tile& operator-=(const Tile& T); //!< Subtracts the x-axis and y-axis coordinates, plane is ignored

        operator bool() const; //!< @returns True if this is not negative @see IsNegative
        friend std::ostream& operator<<(std::ostream& OS, const Tile& T);

        ~Tile();
};

#endif // TILE_HPP_INCLUDED
