-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.h
46 lines (32 loc) · 789 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
#ifndef GAME_H
#define GAME_H
#include "data/BoardModel.h"
#include "data/Player.h"
class Game : public QObject
{
Q_OBJECT
public:
Game();
void start(Player pX, Player pO);
bool getActive();
void placePiece(Cell cell);
void checkForGameOver();
void quit(PieceType quittingPiece);
Player getPlayerX();
Player getPlayerO();
PieceType currentTurnPiece();
signals:
void update_msg_label(QString msg);
void gameInit(Player p1, Player p2);
void gameStateUpdated(Player p1, Player p2, BoardModel board);
void gameEnded(Player winningPlayer);
private:
BoardModel board;
Player playerX;
Player playerO;
PieceType turnPiece_;
PieceType winner_;
void init();
Player winnerPlayer();
};
#endif // GAME_H