simon PR review

This commit is contained in:
2025-05-28 19:24:36 +02:00
parent d50714ef8c
commit 69b91d6497
8 changed files with 149 additions and 123 deletions

View File

@@ -10,8 +10,6 @@
#include <filesystem>
#include <algorithm>
namespace fs = std::filesystem;
PiecesFiles::PiecesFiles() {
}
@@ -135,11 +133,11 @@ 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 (!fs::exists(dataFolderPath)) {
fs::create_directories(dataFolderPath);
if (!std::filesystem::exists(dataFolderPath)) {
std::filesystem::create_directories(dataFolderPath);
}
if (!fs::is_directory(dataFolderPath)) {
if (!std::filesystem::is_directory(dataFolderPath)) {
return false;
}