-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.hh
70 lines (64 loc) · 1.45 KB
/
Game.hh
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef GAME_HH_
#define GAME_HH_
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <list>
#include <unistd.h>
#include <string.h>
#include "Snake.hh"
#include "IGraph.hh"
#include "Items.hh"
#include "Elems.hh"
#include "Exception.hh"
class LibSDL;
class Snake;
class Items;
class Elems;
class IGraph;
class Game
{
private:
Snake *_snake;
unsigned long int _stp;
int _end;
int _mapX;
int _mapY;
int _mov;
int _score;
int _level;
int _point;
int _speed;
int _careerMode;
int _gameMode;
int _backType;
int _foodStat;
int _iaHard;
int _itemMax;
int _itemLife;
int _itemSpeed;
int _itemFreq;
IGraph *renderer;
std::list<Items*> _items;
std::list<Elems*> _elems;
public:
Game(int, int);
Game(int, int, int, int, int);
~Game();
void getMap(int);
void changeMap();
int checkContact(int, int);
void keyAction();
int getNbItems(int);
int headContact();
void generateItems();
void itemsAction();
void snakeAction();
void envIteraction();
void gameLoop();
void display();
void displaySnake();
void initLib(std::string lib);
};
#endif