-
Notifications
You must be signed in to change notification settings - Fork 0
/
Player.h
43 lines (34 loc) · 968 Bytes
/
Player.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
#pragma once
struct Azul;
struct Player {
int id;
int points = 0;
char wall[5][5] = {
{ '.', '.', '.', '.', '.' },
{ '.', '.', '.', '.', '.' },
{ '.', '.', '.', '.', '.' },
{ '.', '.', '.', '.', '.' },
{ '.', '.', '.', '.', '.' }
};
char pattern[15] = {
'-',
'-', '-',
'-', '-', '-',
'-', '-', '-', '-',
'-', '-', '-', '-', '-'
};
// pointer array for more convenient access
char* const lines[5] = {
pattern, pattern + 1, pattern + 3, pattern + 6, pattern + 10
};
char floor[7] = { '_', '_', '_', '_', '_', '_', '_' };
};
// player turn in phase A
void pickTiles(Player&, Azul&);
// player turn in phase B
void placeTilesToWall(Player&, Azul&);
void scoreFloor(Player&);
void displayBoard(const Player&);
void dropToFloor(Player&, Azul&, char tile, int count = 1);
int countFullRows(const Player&);
void scoreBonusPoints(Player&);