added distribution menu

This commit is contained in:
2025-03-29 21:57:27 +01:00
parent 7151be0b1a
commit 314b7a8488
12 changed files with 207 additions and 40 deletions

View File

@@ -2,6 +2,7 @@
#include "../Pieces/Piece.h"
#include "PiecesList.h"
#include "DistributionMode.h"
#include <vector>
#include <memory>
@@ -18,7 +19,7 @@ class Bag {
std::shared_ptr<PiecesList> piecesList; // the list of loaded pieces
int highestSize; // the highest size of piece in the bag
std::vector<std::pair<int, int>> selectedPieces; // the list of pieces that can be given to the player
PiecesDistributionMode distributionMode; // the distribution mode
DistributionMode distributionMode; // the distribution mode
std::vector<double> propotionsPerSize; // the proportion of pieces for each size
std::pair<int, int> next; // the next piece to give
std::vector<PieceBag> currentBags; // for each size, the list of pieces that are still to be taken out before starting a new bag