diff --git a/.gitignore b/.gitignore index 41ef30c..c3e3294 100644 --- a/.gitignore +++ b/.gitignore @@ -37,7 +37,6 @@ Source/.idea/* Source/cmake-build-debug/* Source/cmake-build-release/* Source/.DS_Store -Source/CMakeLists.txt cmake-build-debug .idea .DS_Store diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt new file mode 100644 index 0000000..ef2e6ee --- /dev/null +++ b/Source/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.8) +project(PuzzleSolver) +set(OpenCV_Found 1) +set (OpenCV_DIR C:/openCV/build) +find_package(OpenCV REQUIRED) +set(CMAKE_CXX_STANDARD 11) +set(SOURCE_FILES + main.cpp + header.h + functions/solve/classExtension.cpp + functions/solve/structure.cpp + functions/AbstractionLayers/AbstraktionLayer_Base.h + ) +add_executable(PuzzleSolver ${SOURCE_FILES}) +include_directories(${OpenCV_INCLUDE_DIRS}) +target_link_libraries(PuzzleSolver ${OpenCV_LIBS}) \ No newline at end of file diff --git a/Source/functions/AbstractionLayers/Layer1/AbstractionLayer_1.cpp b/Source/functions/AbstractionLayers/Layer1/AbstractionLayer_1.cpp index f7b766f..f588bc1 100644 --- a/Source/functions/AbstractionLayers/Layer1/AbstractionLayer_1.cpp +++ b/Source/functions/AbstractionLayers/Layer1/AbstractionLayer_1.cpp @@ -14,11 +14,11 @@ void AbstractionLayer_1::PreProcessing(const vector* partArray) //it through qualityVector and removes all that do not trigger PlaceOfPartGood bool AbstractionLayer_1::EvalueteQuality (const coor constraintCoordinate, qualityVector& qVector) { - for(auto it = qualityVector.begin();it!=qualityVector.end();it++) + for(auto it = qVector.begin(); it != qVector.end(); it++) { - if(PlaceOfPartGood(constraintCoordinate,it->first->m_test1.m_connections)) + if(PlaceOfPartGood(constraintCoordinate, it->first->m_test1.m_connections)) continue; - qualityVector.erase(it++); + qVector.erase(it++); } } diff --git a/Source/header.h b/Source/header.h index 73c6149..3146629 100755 --- a/Source/header.h +++ b/Source/header.h @@ -11,5 +11,9 @@ using namespace std; -#include "header/input.h" +/** + * IMPORTANT: Each new layer must be included there, to avoid compile errors + */ +#include "functions/AbstractionLayers/Layer1/AbstractionLayer_1.cpp" + #include "header/solve.h"