filestructure, parts, backlog
added a filestructure as well as the basic parts. a readme and a backlog
This commit is contained in:
Binary file not shown.
After Width: | Height: | Size: 206 KiB |
51
01_Input/01_Klassenstruktur/Klassenstruktur_Code/main.cpp
Normal file
51
01_Input/01_Klassenstruktur/Klassenstruktur_Code/main.cpp
Normal file
@ -0,0 +1,51 @@
|
||||
#include <iostream>
|
||||
#include "vector.h"
|
||||
#define Number_Parts 1008
|
||||
#define Number_Corners 4
|
||||
#define Number_Edges 120
|
||||
#define Number_Inners 884
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Part
|
||||
{
|
||||
public:
|
||||
Part()
|
||||
{
|
||||
for(int i=0;i<8;i++)
|
||||
{
|
||||
Orientation[i] = 0;
|
||||
}
|
||||
}
|
||||
~Part() {}
|
||||
protected:
|
||||
Vector<Part> Part_Array(Number_Parts);
|
||||
uint8_t Orientation[8];
|
||||
};
|
||||
|
||||
class Corner : public Part
|
||||
{
|
||||
public:
|
||||
Corner() {}
|
||||
~Corner() {}
|
||||
private:
|
||||
Vector<Part *> Corner_Array(Number_Corners);
|
||||
};
|
||||
|
||||
class Edge : public Part
|
||||
{
|
||||
public:
|
||||
Edge() {}
|
||||
~Edge() {}
|
||||
private:
|
||||
Vector<Part *> Edge_Array(Number_Edges);
|
||||
};
|
||||
|
||||
class Inner : public Part
|
||||
{
|
||||
public:
|
||||
Inner() {}
|
||||
~Inner() {}
|
||||
private:
|
||||
Vector<Part *> Inner_Array(Number_Inners);
|
||||
};
|
33
01_Input/01_Klassenstruktur/Klassenstruktur_Code/main2.cpp
Normal file
33
01_Input/01_Klassenstruktur/Klassenstruktur_Code/main2.cpp
Normal file
@ -0,0 +1,33 @@
|
||||
#include <iostream>
|
||||
#include "vector.h"
|
||||
|
||||
#define NR_OF_PARTS 1008
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Part
|
||||
{
|
||||
public:
|
||||
Part()
|
||||
{
|
||||
type = 0;
|
||||
for(int i=0;i<8;i++)
|
||||
{
|
||||
connections[i] = 0;
|
||||
}
|
||||
position = -1; //to indicate, that no solution has been found yet
|
||||
orientation = -1;
|
||||
}
|
||||
~Part() {}
|
||||
protected:
|
||||
uint8_t type; //inner:0, edge:1, corner:2
|
||||
uint8_t connections[8]; //mating connections (4 sides): female:0, male:1, none:2
|
||||
uint16_t position; //position on the solved board: 0-1007
|
||||
uint8_t orientation; //CW rotation = orientation*90 (deg)
|
||||
};
|
||||
|
||||
int main(){
|
||||
Vector <Part> part_array(NR_OF_PARTS);
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user