g2chromatic2. written with 0 ai just to see if I could. uses grid22.hpp.

This commit is contained in:
Yggdrasil75
2025-11-12 14:57:37 -05:00
parent ffa2d7ef36
commit f64842d142
7 changed files with 564 additions and 1036 deletions

View File

@@ -10,6 +10,12 @@ class Vec2 {
float x, y;
Vec2() : x(0), y(0) {}
Vec2(float x, float y) : x(x), y(y) {}
Vec2& move(const Vec2 newpos) {
x = newpos.x;
y = newpos.y;
return *this;
}
Vec2 operator+(const Vec2& other) const {
return Vec2(x + other.x, y + other.y);
@@ -266,7 +272,6 @@ class Vec2 {
std::string toString() const {
return "(" + std::to_string(x) + ", " + std::to_string(y) + ")";
}
};
inline std::ostream& operator<<(std::ostream& os, const Vec2& vec) {