feat: (snake point main) finally got tail to work with a few bugs

This commit is contained in:
DarthMooMancer
2025-08-27 19:29:09 -04:00
parent b2c90565bc
commit ac23c873c3
6 changed files with 38 additions and 87 deletions
+1 -1
View File
@@ -5,6 +5,6 @@
constexpr uint16_t ROW = 10;
constexpr uint16_t COL = 10;
constexpr uint16_t FPS = 2;
constexpr uint16_t FPS = 5;
#endif // GLOBALS_HPP
+1
View File
@@ -15,6 +15,7 @@ struct Point {
std::string to_string() const;
void clear(std::array<std::array<char, COL>, ROW> &arr) const;
void set_new_point(int x, int y, int dir);
};
#endif // POINT_HPP
+3 -1
View File
@@ -33,8 +33,10 @@ struct Head {
struct Tail {
Tail(int follow_direction, int row, int col);
Point m_tail_pos;
Point m_previous_tail_pos;
std::vector<Point> m_move_history;
void get_new_point(Point &d);
// void set_point(Point &d);
void get_new_point();
};
struct Body {