size is fix
This commit is contained in:
parent
cf6ee4b001
commit
d27e903713
3 changed files with 7 additions and 7 deletions
|
@ -5,13 +5,13 @@
|
|||
class Plateau {
|
||||
friend std::ostream &operator<<(std::ostream &, const Plateau &);
|
||||
|
||||
// Taille du plateau
|
||||
int taille;
|
||||
|
||||
protected:
|
||||
// Tableau représentant le plateau de jeu
|
||||
Piece ***plateau;
|
||||
|
||||
// Taille du plateau
|
||||
int taille;
|
||||
|
||||
public:
|
||||
Plateau(int taille); // constructor
|
||||
virtual ~Plateau(); // destructor
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
class PlateauButin : public Plateau {
|
||||
public:
|
||||
PlateauButin(int taille);
|
||||
PlateauButin();
|
||||
virtual ~PlateauButin();
|
||||
|
||||
// Initialise le plateau du Butin
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <algorithm>
|
||||
#include <random>
|
||||
|
||||
PlateauButin::PlateauButin(int t) : Plateau(t) {}
|
||||
PlateauButin::PlateauButin() : Plateau(8) {}
|
||||
|
||||
PlateauButin::~PlateauButin() {}
|
||||
|
||||
|
@ -31,8 +31,8 @@ void PlateauButin::initialiserPlateau(Joueur &j1, Joueur &j2) {
|
|||
|
||||
// Place toutes les pieces sur le plateau
|
||||
int index = 0;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
for (int j = 0; j < 8; j++) {
|
||||
for (int i = 0; i < taille; i++) {
|
||||
for (int j = 0; j < taille; j++) {
|
||||
plateau[i][j] = &pieces[index++];
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue