-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJoueur.h
More file actions
45 lines (40 loc) · 1.31 KB
/
Joueur.h
File metadata and controls
45 lines (40 loc) · 1.31 KB
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
//
// Created by lucas on 24/03/2023.
//
#include "Carte.h"
#include <string>
using namespace std;
#ifndef SCHOTTEN_TOTTEN_JOUEUR_H
#define SCHOTTEN_TOTTEN_JOUEUR_H
class Joueur {
protected:
bool ia;
string nom;
int nb_bornes;
vector<Carte*> cartes;
int nb_max_cartes;
int nb_cartes_tactiques_jouees;
int joker_joue;
int nb_points;
public:
Joueur(string n, int nb_cartes, int nb_tactiques_jouees=0, int joker_j = 0, int nb_p=0, int nb_b=9);
Carte& choix_carte();
string& getNom() {return nom;};
int choix_borne();
void ajout_carte(Carte* c);
void setNbPoints(int pts);
int getNbCartes() {return cartes.size();};
int getNbTactiqueJouees() const {return nb_cartes_tactiques_jouees;};
void carteTactiqueJouee() {nb_cartes_tactiques_jouees++;};
vector<Carte*>& getCartes() {return cartes;};
void supprimerCarte(int i);
bool getIa() const {return ia;};
};
class IA : public Joueur {
public:
IA(string n, int nb_cartes, int nb_tactiques_jouees=0, int joker_j = 0, int nb_p=0, int nb_b=9);
Carte& choix_carte(); // Choisi une carte dans la main de l'IA
int choix_borne(); // Choisi une borne pour l'IA
static int choix_entier(const int min, const int max); // Fais un choix aleatoire entre min et max compris
};
#endif //SCHOTTEN_TOTTEN_JOUEUR_H