-
Notifications
You must be signed in to change notification settings - Fork 0
/
board.h
59 lines (56 loc) · 1.34 KB
/
board.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
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef BOARD_H
#define BOARD_H
#include "room.h"
#include "player.h"
#include <QGraphicsView>
#include <QObject>
/** @class Board
* @brief The Board class holds an overall structure of the game and essentially manages the entire game.
*
* The Board class publicly derives from QGraphicsView.
*/
class Board : public QGraphicsView
{
Q_OBJECT
public:
/**
* @brief Board constructor
* @param parent is the parent QWidget of the Board object
*/
explicit Board(QWidget *parent = 0);
/**
* @brief Board destructor
*/
~Board();
/**
* @brief PortalWarp is a function that controls traversal between Room objects
* @param a is the Room being traveled to
*/
void PortalWarp(Room *a);
signals:
/**
* @brief defeat is a custom signal emitted when the player is killed
*/
void defeat();
/**
* @brief win is a custom signal emitted when the player has defeated all the bosses
*/
void win();
public slots:
/**
* @brief game_over is custom slot used to emit the defeat() signal
*/
void game_over();
/**
* @brief boss_kill is a custom slot used to alert the Board of a boss kill
*/
void boss_kill();
private:
Room* main_room;
Room* Room1;
Room* Room2;
Room* Room3;
Player* user;
int bosses;
};
#endif // BOARD_H