#pragma once
#include <SDL2/SDL.h>

namespace quokka_gfx
{
//------------------------------------------------------------
class Point
{
  public:
  Point()                            = default;     // Default constructor
  virtual ~Point()                   = default;     // Default destructor
  Point(const Point &obj)            = default;     // Copy constructor
  Point(Point &&obj)                 = default;     // Move constructor
  Point &operator=(const Point &obj) = default;     // Copy assignment operator
  Point &operator=(Point &&obj)      = default;     // Move assignment operator

  explicit Point(int xPos = 0,     // Constructor
                 int yPos = 0);

  bool operator==(const Point &point) const;     // Equality operator

  [[nodiscard]] SDL_Point toSDL() const;     // Convert to SDL_Point for rendering

  int x = 0;
  int y = 0;
};
//------------------------------------------------------------
/* Constructor */
inline Point::Point(const int xPos, const int yPos)
{
  x = xPos;
  y = yPos;
}
//------------------------------------------------------------
inline bool Point::operator==(const Point &point) const
{
  return x == point.x && y == point.y;
}
//------------------------------------------------------------
/* Convert to SDL_Point for rendering */
inline SDL_Point Point::toSDL() const
{
  return { x, y };
}
//------------------------------------------------------------
}     // namespace quokka_gfx
