-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGame.h
47 lines (36 loc) · 863 Bytes
/
Game.h
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
#ifndef GAME_H
#define GAME_H
#include <QGraphicsView>
#include <QWidget>
#include <QGraphicsScene>
#include <QVector>
#include "robot.h"
#include "Dirt.h"
#include "Score.h"
#include "romba.h"
#include "Health.h"
#include <QFile>
class Game: public QGraphicsView
{
private:
int random;
void drawPanel(int x, int y, int width, int height, QColor color, double opacity);
public:
Game(QWidget * parent=0);
QGraphicsScene * scene;
Robot *robot;
Romba *romba;
//create a vector of dirts
QVector<Dirt*> dirts;
Dirt *dirt;
Dirt *dirt1;
Dirt *dirt2;
Dirt *dirt3;
Score *score;
Score *rombaScore;
Health *health;
void gameOver();
void displayGameOverWindow(QString textToDisplay);
void writeToFile(QString textToWrite);
};
#endif // GAME_H