elements: starting the collision, finally work on it

This commit is contained in:
DarthMooMancer
2025-09-12 10:23:09 -04:00
parent e64017f556
commit 0d8e191975
5 changed files with 33 additions and 1 deletions
+21
View File
@@ -1,4 +1,12 @@
#include "elements.hpp"
#include <cstdlib>
#include <ctime>
void Point::assign() {
std::srand(std::time(0));
m_row = (rand() % (ROW));
m_col = (rand() % (ROW));
}
void Point::assign(int row, int col) {
m_row = row;
@@ -28,3 +36,16 @@ void PointCollection::move() {
}
}
}
void PointCollection::check_collision() {
for(int i = m_point_list.size() - 1; i >= 0; i--) {
if(m_point_list[i].m_direction == 'u') {
}
if(m_point_list[i].m_direction == 'd') {
}
if(m_point_list[i].m_direction == 'l') {
}
if(m_point_list[i].m_direction == 'r') {
}
}
}