/src/snake.cpp |
---|
10,7 → 10,6 |
R = 255; |
G = 255; |
B = 0; |
direction = up; |
} |
void Snake::nextPoint(Point newPoint) |
/include/snake.hpp |
---|
1,31 → 1,20 |
#ifndef SNAKE_HPP |
#define SNAKE_HPP |
enum Direction |
{ |
up; |
down; |
left; |
right; |
}; |
class Snake |
{ |
public: |
Snake(); |
void nextPoint(Point newPoint); |
// Stuff that should be private |
vector<Point> points; // list of points snake occupies |
// Colour Values |
int R; |
int G; |
int B; |
Direction direction; |
}; |
#endif // SNAKE_HPP |
#ifndef SNAKE_HPP |
#define SNAKE_HPP |
class Snake |
{ |
public: |
Snake(); |
void nextPoint(Point newPoint); |
// Stuff that should be private |
vector<Point> points; // list of points snake occupies |
// Colour Values |
int R; |
int G; |
int B; |
}; |
#endif // SNAKE_HPP |