-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclashing.h
74 lines (67 loc) · 3.05 KB
/
clashing.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef CLASHING_H
#define CLASHING_H
////////////////////////////////////////////////////////////
/// \brief Update game.shortClash with 1 if white short
/// castling is allowed, -1 if black, 0 if none of it.
///
/// \param chessPtr pointer to an 8x8 array of figures
/// representing chessboard
/// \param position king's position
/// \param gamePtr pointer to game structure containing
/// all game informations
///
////////////////////////////////////////////////////////////
void shortCastling(struct figure (*chessPtr)[8][8], sfVector2i position, struct game *gamePtr);
////////////////////////////////////////////////////////////
/// \brief Update game.longClash with 1 if white long
/// castling is allowed, -1 if black, 0 if none of it.
///
/// \param chessPtr pointer to an 8x8 array of figures
/// representing chessboard
/// \param position king's position
/// \param gamePtr pointer to game structure containing
/// all game informations
///
////////////////////////////////////////////////////////////
void longCastling(struct figure (*chessPtr)[8][8], sfVector2i position, struct game *gamePtr);
////////////////////////////////////////////////////////////
/// \brief Do white short clashing move and end turn.
///
/// \param chessPtr pointer to an 8x8 array of figures
/// representing chessboard
/// \param gamePtr pointer to game structure containing
/// all game informations
///
////////////////////////////////////////////////////////////
void whiteShortClash(struct figure (*chessPtr)[8][8], struct game *gamePtr);
////////////////////////////////////////////////////////////
/// \brief Do black short clashing move and end turn.
///
/// \param chessPtr pointer to an 8x8 array of figures
/// representing chessboard
/// \param gamePtr pointer to game structure containing
/// all game informations
///
////////////////////////////////////////////////////////////
void blackShortClash(struct figure (*chessPtr)[8][8], struct game *gamePtr);
////////////////////////////////////////////////////////////
/// \brief Do white long clashing move and end turn.
///
/// \param chessPtr pointer to an 8x8 array of figures
/// representing chessboard
/// \param gamePtr pointer to game structure containing
/// all game informations
///
////////////////////////////////////////////////////////////
void whiteLongClash(struct figure (*chessPtr)[8][8], struct game *gamePtr);
////////////////////////////////////////////////////////////
/// \brief Do black long clashing move and end turn.
///
/// \param chessPtr pointer to an 8x8 array of figures
/// representing chessboard
/// \param gamePtr pointer to game structure containing
/// all game informations
///
////////////////////////////////////////////////////////////
void blackLongClash(struct figure (*chessPtr)[8][8], struct game *gamePtr);
#endif