-
Notifications
You must be signed in to change notification settings - Fork 0
/
Case.h
139 lines (119 loc) · 3.91 KB
/
Case.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#pragma once
#include <string>
#include <SFML/Graphics.hpp>
#include "Joueur.h"
#include <Windows.h>
#include "Magasin.h"
using namespace std;
class Case
{
private:
int haut;
int droite;
int gauche;
Magasin* unMagasin;
int type;
//0: Rien | 1: Diligence | 2: Train
//3: Riviere | 4: Duel | 5: Indiens
//6: Sheriff
int typeMagasin;
//0: Rien | 1: Store | 2: Bank | 3: Saloon
sf::RectangleShape* BatNO;
sf::RectangleShape* BatNE;
sf::RectangleShape* BatSE;
sf::RectangleShape* BatSO;
sf::Text* FlecheH;
sf::Text* FlecheD;
sf::Text* FlecheG;
sf::RectangleShape* diligence;
sf::RectangleShape* roue1;
sf::RectangleShape* roue2;
sf::RectangleShape* roue3;
sf::RectangleShape* roue4;
sf::RectangleShape* fleuve;
sf::RectangleShape* wagon;
sf::RectangleShape* fenetre1;
sf::RectangleShape* fenetre2;
sf::RectangleShape* fenetre3;
sf::RectangleShape* toit;
sf::CircleShape* roueT1;
sf::CircleShape* roueT2;
sf::RectangleShape* barreR;
sf::Text* action;
sf::Text* texte;
public:
Case(int haut, int droite, int gauche, int type, sf::Font* pixelArrows, sf::Font* fontPixel, sf::Font* fontTitre);
virtual void afficher(sf::RenderWindow* window);
virtual void actionCase(sf::RenderWindow* window, Joueur* leJoueur);
Magasin* randomMagasin(sf::Font* fontTitre, sf::Font* fontPixel);
Magasin* getMagasin() { return this->unMagasin; }
sf::Text* getFlecheH() { return this->FlecheH; }
sf::Text* getFlecheD() { return this->FlecheD; }
sf::Text* getFlecheG() { return this->FlecheG; }
sf::Text* getTexte() { return this->texte; }
sf::Text* getAction() { return this->action; }
sf::RectangleShape* getDiligence() { return this->diligence; }
sf::RectangleShape* getRoue1() { return this->roue1; }
sf::RectangleShape* getRoue2() { return this->roue2; }
sf::RectangleShape* getRoue3() { return this->roue3; }
sf::RectangleShape* getRoue4() { return this->roue4; }
sf::RectangleShape* getFleuve() { return this->fleuve; }
sf::RectangleShape* getWagon() { return this->wagon; }
sf::RectangleShape* getFenetre1() { return this->fenetre1; }
sf::RectangleShape* getFenetre2() { return this->fenetre2; }
sf::RectangleShape* getFenetre3() { return this->fenetre3; }
sf::CircleShape* getRoueT1() { return this->roueT1; }
sf::CircleShape* getRoueT2() { return this->roueT2; }
sf::RectangleShape* getToit() { return this->toit; }
sf::RectangleShape* getBarreR() { return this->barreR; }
int getHaut();
int getDroite();
int getGauche();
int getType() { return this->type; }
int getTypeMagasin() { return this->typeMagasin; }
};
class caseDuel: public Case
{
public:
caseDuel(sf::Font* pixelArrows, sf::Font* fontPixel, sf::Font* fontTitre);
virtual void afficher(sf::RenderWindow* window);
virtual void actionCase(sf::RenderWindow* window, Joueur* leJoueur);
};
class caseDiligence: public Case
{
public:
caseDiligence(sf::Font* pixelArrows, sf::Font* fontPixel, sf::Font* fontTitre);
virtual void afficher(sf::RenderWindow* window);
};
class caseTrain : public Case
{
public:
caseTrain(sf::Font* pixelArrows, sf::Font* fontPixel, sf::Font* fontTitre);
virtual void afficher(sf::RenderWindow* window);
};
class caseRiviere : public Case
{
public:
caseRiviere(sf::Font* pixelArrows, sf::Font* fontPixel, sf::Font* fontTitre);
virtual void afficher(sf::RenderWindow* window);
};
class caseIndiens : public Case
{
public:
caseIndiens(sf::Font* pixelArrows, sf::Font* fontPixel, sf::Font* fontTitre);
virtual void afficher(sf::RenderWindow* window);
virtual void actionCase(sf::RenderWindow* window, Joueur* leJoueur);
};
class caseSheriff : public Case
{
public:
caseSheriff(sf::Font* pixelArrows, sf::Font* fontPixel, sf::Font* fontTitre);
virtual void afficher(sf::RenderWindow* window);
virtual void actionCase(sf::RenderWindow* window, Joueur* leJoueur);
};
class caseRien : public Case
{
public:
caseRien(sf::Font* pixelArrows, sf::Font* fontPixel, sf::Font* fontTitre);
virtual void afficher(sf::RenderWindow* window);
};