-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainJoueur.cpp
54 lines (44 loc) · 1.09 KB
/
mainJoueur.cpp
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
#include "mainJoueur.h"
#include "Deck.h"
#include "Cartes.h"
#include "cartesBornes.h"
#include "cartesBottes.h"
#include <cstdlib>
#include <string>
#include <algorithm>
#include <ctime>
#include <iomanip>
#include <vector>
/*mainJoueur::mainJoueur()
{
}
void mainJoueur::ajouterCarte(Cartes* c) {
this->cartes.push_back(c);
}
Cartes* Deck::prendreCarte() {
Cartes* cart = this->cartes[0];
this->cartes.erase(this->cartes.begin());
return cart;
}
void mainJoueur::pioche() {
// this->cartesPioche;
for (int i = 0; i < 4; i++) {
this->cartesPioche.push_back(cartes[cartes.size() - (1 + i)]);
this->cartes.pop_back();
}
}
void mainJoueur::distribuer(Deck* deck) {
for (int x = 1; x <= 7; x++) {
this->ajouterCarte(deck->prendreCarte());
}
}
void mainJoueur::afficher() {
int x;
for (x = 0; x < this->cartes.size(); x++) {
this->cartes[x]->afficher();
}
}
void mainJoueur::choisir(int tour, int choix, Deck* deck) {
this->cartes.erase(this->cartes.begin() + choix - 1);
this->ajouterCarte(deck->prendreCarte());
}*/