This commit is contained in:
DarthMooMancer
2025-08-21 09:17:37 -04:00
parent a128048a8f
commit 5e887e3688
12 changed files with 134 additions and 133 deletions
+6 -7
View File
@@ -5,14 +5,13 @@
#include "point.hpp"
struct Snake {
Snake(int default_direction);
void create_tail(int row, int col);
std::pair<int, int> get_new_point(int tail_index, int direction, int row, int col);
void update_tails_count();
std::vector<Point> m_tails;
Snake(int default_direction, int row, int col);
Point m_head;
std::vector<Point> m_tails;
int m_direction; // 1: Down, 2: Up, 3: Left, 4: Right
int m_tails_count;
void create_tail(int row, int col); // Adds a new tail to m_tails at { row, col }
void get_new_tail_point(int tail_index, int direction);
};
#endif