refactor: renaming functions and removing old functions

This commit is contained in:
DarthMooMancer
2025-08-30 01:23:38 -04:00
parent 96e5eb9930
commit b0393c65f2
3 changed files with 6 additions and 7 deletions
+2 -2
View File
@@ -39,7 +39,7 @@ Body::Body() {
m_collision = false;
}
void Body::collision(Head &head) {
void Body::check_collision(Head &head) {
for(int i = 0; i < m_body.size(); i++) {
if(m_body.at(i).m_tail_pos.m_row == head.m_head.m_row) {
if(m_body.at(i).m_tail_pos.m_col == head.m_head.m_col) {
@@ -49,7 +49,7 @@ void Body::collision(Head &head) {
}
}
void Body::add_tail() {
void Body::check_new_tail() {
if(m_score >= 1) {
m_score = 0;
m_body.push_back(Tail{});