wip
This commit is contained in:
+6
-7
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user