#pragma once #include class IVector2 { public: virtual ~IVector2() = default; /** * Returns the X coordinate. */ [[nodiscard]] virtual unsigned int x() const = 0; /** * Sets the X coordinate. * * @param x A new X coordinate */ virtual void x(unsigned int x) = 0; /** * Returns the Y coordinate. */ [[nodiscard]] virtual unsigned int y() const = 0; /** * Sets the Y coordinate. * * @param Y A new Y coordinate */ virtual void y(unsigned int y) = 0; virtual const IVector2 &operator+=(const IVector2 &vector2) = 0; virtual const IVector2 &operator-=(const IVector2 &vector2) = 0; }; struct IVector2Options { unsigned int x; unsigned int y; }; using IVector2Factory = std::shared_ptr (*)(const IVector2Options &options);