forked from jcalvarezj/snake
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWall.hpp
More file actions
34 lines (26 loc) · 640 Bytes
/
Wall.hpp
File metadata and controls
34 lines (26 loc) · 640 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "Collideable.hpp"
#include "Screen.hpp"
#include "SDL2/SDL.h"
#ifndef WALL_HPP
#define WALL_HPP
namespace SnakeGame {
/**
* This structure represents a single wall, which kills the snake on collision
* Its (x,y) position corresponds to the top left pixel
*/
struct Wall: Collideable {
static const Uint8 S_WALL_RED;
static const Uint8 S_WALL_GREEN;
static const Uint8 S_WALL_BLUE;
static const unsigned int S_WALL_WIDTH;
/**
* @see Collideable#Collideable(int, int, int)
*/
Wall(int x, int y, int t);
/**
* @see Drawable#draw
*/
void draw(Screen & screen);
};
} // namespace SnakeGame
#endif // WALL_HPP