Files
snake/include/snake.hpp
T

19 lines
410 B
C++

#ifndef SNAKE_HPP
#define SNAKE_HPP
#include <vector>
#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;
int m_direction; // 1: Down, 2: Up, 3: Left, 4: Right
int m_tails_count;
};
#endif