nsnake
Classic snake game for the terminal
src
Display
Animations
AnimationSnakes.hpp
1
#ifndef ANIMATIONSNAKES_H_DEFINED
2
#define ANIMATIONSNAKES_H_DEFINED
3
4
#include <Engine/Graphics/Animation.hpp>
5
#include <Engine/Helpers/Timer.hpp>
6
7
#include <vector>
8
9
#define MAX_SNAKES 100
10
11
struct
LilSnake
12
{
13
int
x;
14
int
y;
15
int
size;
16
17
LilSnake
(
int
x,
int
y,
int
size):
18
x(x),
19
y(y),
20
size(size)
21
{ }
22
};
23
25
class
AnimationSnakes
:
public
Animation
26
{
27
public
:
28
AnimationSnakes
(Window* window);
29
virtual
~
AnimationSnakes
() {};
30
31
void
load();
32
void
update();
33
void
draw();
34
35
private
:
36
std::vector<LilSnake> lilsnakes;
37
39
Timer updateTimer;
40
42
Timer addTimer;
43
44
void
addSnake();
45
};
46
47
#endif //ANIMATIONSNAKES_H_DEFINED
48
LilSnake
Definition:
AnimationSnakes.hpp:11
AnimationSnakes
Rules and behavior of the Fire animation.
Definition:
AnimationSnakes.hpp:25
Generated on Fri Feb 8 2019 14:33:04 for nsnake by
1.8.15