started random algorithm. problem with funciton separation between properties and layer
This commit is contained in:
		@@ -2,11 +2,9 @@
 | 
			
		||||
// Created by mpapa on 05.12.2017.
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
#ifndef SOURCE_INPUT_H
 | 
			
		||||
#define SOURCE_INPUT_H
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
#include <cstdint>
 | 
			
		||||
 | 
			
		||||
#include "../functions/AbstractionLayers/Layer1/AbstractionLayer_1_Properties.h"
 | 
			
		||||
#include "../functions/AbstractionLayers/DestructionPower/DestructionPower_Properties.h"
 | 
			
		||||
@@ -16,8 +14,9 @@ class LayerContainer;
 | 
			
		||||
class Part
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Part() : m_partID(0) {}
 | 
			
		||||
    ~Part() {}
 | 
			
		||||
    Part() : m_partID(0), m_numOfRotations(0)
 | 
			
		||||
    {}
 | 
			
		||||
    ~Part() = default;
 | 
			
		||||
 | 
			
		||||
    int32_t GetPartID () const
 | 
			
		||||
    {
 | 
			
		||||
@@ -50,8 +49,6 @@ class coor
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    unsigned int col, row;
 | 
			
		||||
    coor(unsigned int newcol=-1,unsigned int newrow=-1): col(newcol), row(newrow)
 | 
			
		||||
    coor (unsigned int newcol,unsigned int newrow): col(newcol), row(newrow)
 | 
			
		||||
    {}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif //SOURCE_INPUT_H
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,7 @@
 | 
			
		||||
//
 | 
			
		||||
// Created by mpapa on 05.12.2017.
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
#ifndef SOURCE_SOLVE_H
 | 
			
		||||
#define SOURCE_SOLVE_H
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
#include <vector>
 | 
			
		||||
#include <iostream>
 | 
			
		||||
#include <opencv2/highgui/highgui.hpp>
 | 
			
		||||
@@ -30,11 +27,9 @@ public:
 | 
			
		||||
    void decreaseRandomed() { randomed--;}
 | 
			
		||||
    int hasRandomed(){return randomed;}
 | 
			
		||||
 | 
			
		||||
    LogEntry()
 | 
			
		||||
    {
 | 
			
		||||
        myCoor = coor(0,0);
 | 
			
		||||
    LogEntry(coor newCoor = coor(0,0)): myCoor(newCoor){
 | 
			
		||||
        abstractionLevel=0;
 | 
			
		||||
        set=0;
 | 
			
		||||
        set=false;
 | 
			
		||||
    }
 | 
			
		||||
private:
 | 
			
		||||
    bool set;
 | 
			
		||||
@@ -56,7 +51,7 @@ public:
 | 
			
		||||
    void printPuzzle();
 | 
			
		||||
 | 
			
		||||
    void createRandomBox(){createRandomPuzzle();putIntoBox();shuffle();}
 | 
			
		||||
    void createRandomPuzzle(){a1->CreateRandomPuzzle();}
 | 
			
		||||
    void createRandomPuzzle();
 | 
			
		||||
    void putIntoBox();
 | 
			
		||||
    void shuffle();
 | 
			
		||||
 | 
			
		||||
@@ -85,4 +80,3 @@ bool backtrack(vector<LogEntry>& log, vector<Part*>& p_Box, Puzzle& puzzleMat);
 | 
			
		||||
 | 
			
		||||
void createNextLogElement(vector<LogEntry>& log, vector<Part*>& p_Box, Puzzle& puzzleMat);
 | 
			
		||||
 | 
			
		||||
#endif //SOURCE_SOLVE_H
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user