-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame.h
More file actions
42 lines (32 loc) · 736 Bytes
/
Game.h
File metadata and controls
42 lines (32 loc) · 736 Bytes
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
#pragma once
#include "Public enum.h"
#include <vector>
//Forward class declarations:
class Player;
class Board;
class Move;
class Game
{
private:
std::vector<Player*> players;
Board *board;
Player *currentTurn;
GameStatus status = static_cast<GameStatus>(0);
std::vector<Move*> *movesPlayed;
public:
virtual ~Game()
{
delete board;
delete currentTurn;
delete movesPlayed;
}
private:
void initialize(Player *p1, Player *p2);
public:
virtual bool isEnd();
virtual bool getStatus();
virtual void setStatus(GameStatus status);
virtual bool playerMove(Player *player, int startX, int startY, int endX, int endY);
private:
bool makeMove(Move *move, Player *player);
};