-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrulesChecker.h
58 lines (32 loc) · 1.44 KB
/
rulesChecker.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
//
// Created by Michal on 08.01.2019.
//
#ifndef LAB3_RULESCHECKER_H
#define LAB3_RULESCHECKER_H
#include "chessBoard.h"
/*
* rules checker is class which knows every rules of the game.
* main function is to check if given move is possible
* */
class rulesChecker {
chessBoard *Board;
void checkPawnMove(vector<vertexes> &possibilities, int x, int y);
void checkKnightMove(vector<vertexes> &possibilities, int x, int y);
void checkKingMove(vector<vertexes> &possibilities, int x, int y);
void checkRookMove(vector<vertexes> &possibilities, int x, int y);
void checkBishopMove(vector<vertexes> &possibilities, int x, int y);
void checkQueenMove(vector<vertexes> &possibilities, int x, int y);
void checkUp(vector<vertexes> &possibilities, int x, int y);
void checkDown(vector<vertexes> &possibilities, int x, int y);
void checkRight(vector<vertexes> &possibilities, int x, int y);
void checkLeft(vector<vertexes> &possibilities, int x, int y);
void checkUpLeft(vector<vertexes> &possibilities, int x, int y);
void checkUpRight(vector<vertexes> &possibilities, int x, int y);
void checkDownLeft(vector<vertexes> &possibilities, int x, int y);
void checkDownRight(vector<vertexes> &possibilities, int x, int y);
bool canAddToPossibilities(vertexes temp);
public:
rulesChecker();
vector<vertexes> checkMove(int x, int y, chessBoard *source);
};
#endif //LAB3_RULESCHECKER_H