Merge branch 'Team_CMU_MergeBase' of https://github.com/MMRVZ2017/MPK.Puzzle into Team_CMU_MergeBase

This commit is contained in:
Raphael Maenle 2017-12-20 22:05:30 +01:00
commit 23d97293a3
4 changed files with 24 additions and 5 deletions

1
.gitignore vendored
View File

@ -37,7 +37,6 @@ Source/.idea/*
Source/cmake-build-debug/* Source/cmake-build-debug/*
Source/cmake-build-release/* Source/cmake-build-release/*
Source/.DS_Store Source/.DS_Store
Source/CMakeLists.txt
cmake-build-debug cmake-build-debug
.idea .idea
.DS_Store .DS_Store

16
Source/CMakeLists.txt Normal file
View File

@ -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})

View File

@ -14,11 +14,11 @@ void AbstractionLayer_1::PreProcessing(const vector<Part*>* partArray)
//it through qualityVector and removes all that do not trigger PlaceOfPartGood //it through qualityVector and removes all that do not trigger PlaceOfPartGood
bool AbstractionLayer_1::EvaluateQuality (const coor constraintCoordinate, qualityVector& qVector) bool AbstractionLayer_1::EvaluateQuality (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; continue;
qualityVector.erase(it++); qVector.erase(it++);
} }
} }

View File

@ -11,5 +11,9 @@
using namespace std; 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" #include "header/solve.h"