From 82d0c740c3b96fd29051e4470ea42aad31710df8 Mon Sep 17 00:00:00 2001 From: g-spacewhale Date: Thu, 30 Nov 2017 14:19:25 +0100 Subject: [PATCH] added a simple converter from part to puzzlepiece called convertPart2PuzzlePiece. takes and gives vectors only --- Source/functions/solve/classExtension.cpp | 12 ++++++++++++ Source/functions/solve/structure.cpp | 1 + Source/main.cpp | 6 ++---- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Source/functions/solve/classExtension.cpp b/Source/functions/solve/classExtension.cpp index 9c620af..6b35e83 100644 --- a/Source/functions/solve/classExtension.cpp +++ b/Source/functions/solve/classExtension.cpp @@ -269,4 +269,16 @@ void numerateBox(vector& myBox) myBox[i].setBoxIdentifier(i); return; +} + +std::vector convertPart2PuzzlePiece(std::vector simplePartBox) +{ + std::vector advancedPartBox; + for(int i=0;i& log, vector& p_Box, Puzzle& puzzl { (log.back().PieceCollector[0])->shift(1); + //check rotion while((log.back().PieceCollector[0])->getShift() !=0 && (log.back().PieceCollector[0])->getShift() !=3) { log.back().PieceCollector[0]->shift(1); diff --git a/Source/main.cpp b/Source/main.cpp index 00cf685..158c2bc 100644 --- a/Source/main.cpp +++ b/Source/main.cpp @@ -3,13 +3,13 @@ #include "header.h" -#include "../Codicil/test_puzzle_long40x40.h" +//#include "../Codicil/test_puzzle_long40x40.h" int main() { - int cols=4, rows=4; + int cols=20, rows=20; //some basic part stuff vector myFirstPuzzle; Part myFirstPart; @@ -40,8 +40,6 @@ int main() Puzzle puzzleMat(cols, rows); //vector> ab1class = abstractionLayer1classify(log, p_myFirstBox,puzzleMat); - for(int i=0;i