-
Notifications
You must be signed in to change notification settings - Fork 0
/
ReversiGame.h
50 lines (42 loc) · 1.28 KB
/
ReversiGame.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
/*
* ReversiGame.h
*
* 313297897
* Author: Yael Hacmon
*/
#ifndef REVERSIGAME_H_
#define REVERSIGAME_H_
#include "Board.h"
#include "Player.h"
#include "ViewGame.h"
#include "GameManger.h"
class ReversiGame : public GameManger
{
public:
ReversiGame() {}
virtual ~ReversiGame() {}
virtual void buildVectorByMoves(vector<Point>& possibleMoves) const;
virtual void finishSteps(int incScores, int decScores) const;
virtual void moveInBoard(Point pointToChange);
virtual void messageWin() const;
/**
* building the vector of possible moves-for each of the empty cells-
* check if the point is valid point to the player by check all the eight
* directions that are optional.
* if the point is valis- insert the vector.
*
* @param possibleMoves vector of possible moves
* @param isValidPoint
*/
void fillVectorByPoint(vector<Point>& possibleMoves, Point isValidPoint) const;
// directions:
bool checkUp(Point isValidPoint) const;
bool checkUpRight(Point isValidPoint) const;
bool checkRight(Point isValidPoint) const;
bool checkRightDown(Point isValidPoint) const;
bool checkDown(Point isValidPoint) const;
bool checkLeftDown(Point isValidPoint) const;
bool checkLeft(Point isValidPoint) const;
bool checkUpLeft(Point isValidPoint) const;
};
#endif /* REVERSIGAME_H_ */