fix: fixed smashing error by checking for symbols instead of just setting points to ROW and COL when making hole in pipe

This commit is contained in:
DarthMooMancer
2025-09-04 19:35:34 -04:00
parent f58907eb93
commit 57118a9fc2
4 changed files with 15 additions and 12 deletions
+4 -3
View File
@@ -4,17 +4,18 @@
#include "globals.hpp"
struct Point {
Point() : m_row(0), m_col(0) {};
Point(int row, int col) : m_row(row), m_col(col) {};
Point() : m_row(0), m_col(0), m_symbol(' ') {};
Point(int row, int col, char symbol) : m_row(row), m_col(col), m_symbol(symbol) {};
int m_row;
int m_col;
char m_symbol;
void assign(int row, int col);
void to_string();
};
struct Bird {
Bird() : m_fly(false) {};
Point m_body {(ROW/2), 4};
Point m_body { (ROW/2), 4, '*' };
bool m_fly;
void move();
void check_collision();