working asset manager !
All checks were successful
Linux arm64 / Build (push) Successful in 1m58s

This commit is contained in:
2025-05-27 21:29:56 +02:00
parent 3d1feb6295
commit d50714ef8c
8 changed files with 175 additions and 19 deletions

View File

@@ -10,6 +10,8 @@
#include <filesystem>
#include <algorithm>
namespace fs = std::filesystem;
PiecesFiles::PiecesFiles() {
}
@@ -132,7 +134,12 @@ bool PiecesFiles::loadPieces(int polyominoSize, std::vector<Piece>& pieces, std:
bool PiecesFiles::getFilePath(int polyominoSize, std::string& filePath) const {
std::string dataFolderPath = "data/pieces/";
if (!std::filesystem::is_directory(dataFolderPath)) {
if (!fs::exists(dataFolderPath)) {
fs::create_directories(dataFolderPath);
}
if (!fs::is_directory(dataFolderPath)) {
return false;
}