feat(snake.hpp): adding a member argument for move history

This commit is contained in:
DarthMooMancer
2025-08-23 14:17:59 -04:00
parent 667d7219bf
commit 1bb5ecad33
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -8,8 +8,10 @@
struct Point {
int m_row;
int m_col;
int m_direction;
Point() {}
Point(int x, int y) : m_row(x), m_col(y) {}
Point(int x, int y, int dir) : m_row(x), m_col(y), m_direction(dir) {}
std::string to_string() const;
void clear(std::array<std::array<char, COL>, ROW> &arr) const;
+1 -1
View File
@@ -37,7 +37,7 @@ struct Head {
struct Tail {
Point m_tail_pos;
std::vector<Point> m_move_history;
};
#endif