feat: (snake point main) finally got tail to work with a few bugs
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user