/include/sssnakesss.hpp |
---|
1,33 → 1,41 |
#ifndef SSSNAKESSS_HPP |
#define SSSNAKESSS_HPP |
class SSSNAKESSS |
{ |
public: |
SSSNAKESSS(); |
~SSSNAKESSS(); |
bool init(); |
bool initSDL(); |
bool initOpenGL(); |
void initData(); |
void run(); |
void checkEvents(); |
void update(); |
void draw(); |
void end(); |
vector<string> listDir(string dir); |
private: |
bool running; |
SDL_Surface *screen; |
map<string, Texture *> textures; |
Snake *snake; |
}; |
#endif // SSSNAKESSS_HPP |
#ifndef SSSNAKESSS_HPP |
#define SSSNAKESSS_HPP |
#include "point.hpp" |
class SSSNAKESSS |
{ |
public: |
SSSNAKESSS(); |
~SSSNAKESSS(); |
bool init(); |
bool initSDL(); |
bool initOpenGL(); |
void initData(); |
void run(); |
void checkEvents(); |
void update(); |
void draw(); |
void initLevel(int level); |
void end(); |
vector<string> listDir(string dir); |
private: |
bool running; |
SDL_Surface *screen; |
map<string, Texture *> textures; |
Snake *snake; // controlled snake (snakes[0]) |
vector<Snake *> snakes; // all snakes |
vector<Point> obstacles; |
}; |
#endif // SSSNAKESSS_HPP |
/include/snake.hpp |
---|
15,6 → 15,7 |
Snake(); |
void nextPoint(Point newPoint); |
void move(); |
// Stuff that should be private |
vector<Point> points; // list of points snake occupies |