feat: the start of a strong collision system

This commit is contained in:
DarthMooMancer
2025-09-18 12:09:43 -04:00
parent d6a769900f
commit b446c4c158
4 changed files with 62 additions and 36 deletions
+3 -5
View File
@@ -6,13 +6,12 @@
#include "globals.hpp"
struct Point {
Point() : m_row(0), m_col(0), m_symbol(2), m_direction('n'), m_collide(false) {};
Point(int row, int col) : m_row(row), m_col(col), m_symbol(2), m_direction('n'), m_collide(false) {};
Point() : m_row(0), m_col(0), m_symbol(2), m_direction('n') {};
Point(int row, int col) : m_row(row), m_col(col), m_symbol(2), m_direction('n') {};
char m_direction;
int m_row;
int m_col;
int m_symbol;
bool m_collide;
void assign();
void assign(int row, int col);
std::string to_string();
@@ -20,10 +19,9 @@ struct Point {
struct PointCollection {
std::vector<Point> m_point_list;
void move();
void move(Point* m_board[ROW][COL]);
void collide_with_adjacent(Point* board[ROW][COL]);
void set_direction(char direction);
void check_collision();
};
#endif