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,8 +2,8 @@
#include "Piece.h"
#include <Vector>
#include <String>
#include <vector>
#include <string>
/**
@@ -12,26 +12,26 @@
class PiecesFiles {
public:
/**
* Initializes file manager
* Default constructor
*/
PiecesFiles();
/**
* Generate a file containing all the pieces of the specified size,
* returns false if the file couldn't be created
* Generate a file containing all the pieces of the specified size
* @return If the file could be created
*/
bool savePieces(int order) const;
bool savePieces(int polyominoSize) const;
/**
* Replace the content of the vectors by the pieces of the specified size, if the file wasn't found the vectors stays untouched,
* returns false if the file wasn't found
* Replace the content of the vectors by the pieces of the specified size, if the file wasn't found the vectors stays untouched
* @return If the file was found
*/
bool loadPieces(int order, std::vector<Piece>& pieces, std::vector<int>& convexPieces, std::vector<int>& holelessPieces, std::vector<int>& otherPieces) const;
bool loadPieces(int polyominoSize, std::vector<Piece>& pieces, std::vector<int>& convexPieces, std::vector<int>& holelessPieces, std::vector<int>& otherPieces) const;
private:
/**
* Puts the path to the piece file of the specified size in order, if the data folder wasn't found the string stays untouched,
* returns false if the data folder wasn't found
* Puts the path to the piece file of the specified size in order, if the data folder wasn't found the string stays untouched
* @return If the data folder was found
*/
bool getFilePath(int order, std::string& filePath) const;
bool getFilePath(int polyominoSize, std::string& filePath) const;
};