mis en place la PR de simon sur les couleurs

This commit is contained in:
2025-02-28 18:42:04 +01:00
parent f0f391ade6
commit 26f501f7e8
29 changed files with 713 additions and 665 deletions

View File

@@ -2,7 +2,7 @@
#include "../Pieces/Piece.h"
#include <Vector>
#include <vector>
/**
@@ -10,11 +10,11 @@
*/
class Bag {
private:
std::vector<Piece> pieces; // the pieces the bag can dispense
int next; // the next piece to give
std::vector<Piece> pieces; // the pieces the bag can dispense
int next; // the next piece to give
std::vector<int> currentBag; // the list of pieces that are still to be taken out before starting a new bag
std::vector<int> nextBag; // the list of pieces that have been taken out of the current bag and have been placed in the next
std::vector<int> nextBag; // the list of pieces that have been taken out of the current bag and have been placed in the next
public:
/**
* Creates a new bag of the specified list of pieces
@@ -22,12 +22,14 @@ class Bag {
Bag(const std::vector<Piece>& pieces);
/**
* Looks at what the next picked piece will be
* Looks at what the next picked piece will be, without removing it from the bag
* @return The next piece
*/
Piece lookNext();
/**
* Picks a new piece from the current bag
* Picks a new piece from the current bag, removing it from the bag
* @return The next piece
*/
Piece getNext();