From 0a2de22e63a9903ab2258c534600c2249d68ac64 Mon Sep 17 00:00:00 2001 From: Raphael Maenle <17550607+g-spacewhale@users.noreply.github.com> Date: Thu, 18 Jan 2018 21:47:53 +0100 Subject: [PATCH] cw: added multios --- .../AbstractionLayers/Layer1/AbstractionLayer_1.cpp | 2 +- .../AbstractionLayers/Layer1/AbstractionLayer_1.h | 8 ++++++++ Source/functions/solve/puzzleExtension.cpp | 1 - 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Source/functions/AbstractionLayers/Layer1/AbstractionLayer_1.cpp b/Source/functions/AbstractionLayers/Layer1/AbstractionLayer_1.cpp index b594cff..fe9faef 100644 --- a/Source/functions/AbstractionLayers/Layer1/AbstractionLayer_1.cpp +++ b/Source/functions/AbstractionLayers/Layer1/AbstractionLayer_1.cpp @@ -72,7 +72,7 @@ bool AbstractionLayer_1::RemoveConstraintOnPosition(const coor constraintCoordin void AbstractionLayer_1::CreateRandomPuzzle() { std::minstd_rand simple_rand; - simple_rand.seed((unsigned int)"dumbo"); + simple_rand.seed((unsigned int)time(nullptr)); //dumbo for(int col = 0; col < m_constraintMatrix.size()-2; col++){ for(int row = 0; row < (m_constraintMatrix[col].size() - 2);) diff --git a/Source/functions/AbstractionLayers/Layer1/AbstractionLayer_1.h b/Source/functions/AbstractionLayers/Layer1/AbstractionLayer_1.h index d079332..7889a14 100644 --- a/Source/functions/AbstractionLayers/Layer1/AbstractionLayer_1.h +++ b/Source/functions/AbstractionLayers/Layer1/AbstractionLayer_1.h @@ -24,7 +24,15 @@ #include #define DISPLAY false + +#ifdef _WIN32 #define PATH "..\\..\\..\\pieces\\%04d.jpg" +#elif defined __unix__ +#define PATH "..//..//..//pieces//%04d.jpg" +#elif defined __APPLE__ + #define PATH "..//..//..//pieces//%04d.jpg" +#endif + #define IMG_SIZE 400 #define TOP 6 #define RIGHT 4 diff --git a/Source/functions/solve/puzzleExtension.cpp b/Source/functions/solve/puzzleExtension.cpp index d3ced5c..cf38fcf 100644 --- a/Source/functions/solve/puzzleExtension.cpp +++ b/Source/functions/solve/puzzleExtension.cpp @@ -128,7 +128,6 @@ Mat Puzzle::readImage(int fileIndex, const char* inputDir){ } Mat Puzzle::resultImage( vector& log){ - int Y_size = 600; // chose this to fit your monitor! int separator = 1; int partHeight = 90;