-
Notifications
You must be signed in to change notification settings - Fork 0
/
casillas.h
58 lines (48 loc) · 1.07 KB
/
casillas.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
#include <vector>
using namespace std;
// Clase base abstracta para Casilla
class Casilla
{
public:
virtual char getTipo() const = 0;
virtual int getPoints() const = 0;
virtual ~Casilla() {} // Añade un destructor virtual para la clase base
};
// Clase derivada para Casilla Normal
class CasillaNormal : public Casilla
{
private:
int points;
public:
char getTipo() const override;
int getPoints() const override;
};
// Clase derivada para Casilla Serpiente
class CasillaSerpiente : public Casilla
{
private:
int penalty;
public:
CasillaSerpiente(int penalty);
char getTipo() const override;
int getPoints() const override;
};
// Clase derivada para Casilla Escalera
class CasillaEscalera : public Casilla
{
private:
int reward;
public:
CasillaEscalera(int reward);
char getTipo() const override;
int getPoints() const override;
};
// Clase Board
class Board
{
private:
vector<Casilla *> casillas;
public:
Board(int total, int escaleras, int serpientes, int penalty, int reward);
vector<Casilla *> getCasillas() const;
};