-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinitialize_pawns.cpp
More file actions
37 lines (33 loc) · 822 Bytes
/
Copy pathinitialize_pawns.cpp
File metadata and controls
37 lines (33 loc) · 822 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
#include "functions_definitions.h"
void initialize_pawns(char pawns[N_COLUMNS][NUMBER_OF_ROWS_IN_COLUMN])
{
/*
E -> empty place
R -> this means that given pawn belongs to "Red" player
B -> this means that given pawn belongs to "Blue" player
*/
for (int i = 0; i < N_COLUMNS; ++i)
{
for (int j = 0; j < NUMBER_OF_ROWS_IN_COLUMN; ++j)
{
pawns[i][j] = 'E';
}
}
for (int i = 0; i < 5; ++i)
{
pawns[5][i] = 'B';
pawns[12][i] = 'B';
pawns[11][i] = 'R';
pawns[18][i] = 'R';
}
for (int i = 0; i < 3; ++i)
{
pawns[7][i] = 'B';
pawns[16][i] = 'R';
}
for (int i = 0; i < 2; ++i)
{
pawns[23][i] = 'B';
pawns[0][i] = 'R';
}
}