forked from jcalvarezj/snake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFood.hpp
48 lines (40 loc) · 957 Bytes
/
Food.hpp
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* Snake game program using the SDL library
*
* @author J. Alvarez
*/
#include "Collideable.hpp"
#include "Screen.hpp"
#include "SDL2/SDL.h"
#ifndef FOOD_HPP
#define FOOD_HPP
namespace SnakeGame {
/**
* This structure represents a food item
* Its (x,y) position corresponds to the top left pixel
*/
struct Food: Collideable {
static const Uint8 S_FOOD_1_RED;
static const Uint8 S_FOOD_1_GREEN;
static const Uint8 S_FOOD_1_BLUE;
static const Uint8 S_FOOD_2_RED;
static const Uint8 S_FOOD_2_GREEN;
static const Uint8 S_FOOD_2_BLUE;
static const Uint8 S_FOOD_3_RED;
static const Uint8 S_FOOD_3_GREEN;
static const Uint8 S_FOOD_3_BLUE;
static const unsigned int S_FOOD_WIDTH;
static const int S_VALUE_1;
static const int S_VALUE_2;
static const int S_VALUE_3;
/**
* Default constructor for Food instances
*/
Food();
/**
* @see Drawable#draw
*/
void draw(Screen & screen);
};
} // namespace SnakeGame
#endif // FOOD_HPP