small max cube_count fix
This commit is contained in:
parent
9e5719f8f0
commit
9b3e642475
@ -3,12 +3,6 @@
|
||||
|
||||
std::vector<Vec3> createCubes(int pairs)
|
||||
{
|
||||
//zwei bis zehn paare
|
||||
if (pairs >10 || pairs <= 1)
|
||||
{
|
||||
// 6 Karten-Positionen im 3x2 Raster
|
||||
return {{-2, 0, -2}, {0, 0, -2}, {2, 0, -2},{-2, 0, 0}, {0, 0, 0}, {2, 0, 0}}; // Default field
|
||||
}
|
||||
std::vector<int> fieldSize = calculateFieldSize(pairs);
|
||||
std::vector<Vec3> cubePositions;
|
||||
//std::cout<<(fieldSize[0])<<std::endl;
|
||||
@ -48,7 +42,6 @@ std::vector<int> calculateFieldSize(int pairs)
|
||||
|
||||
std::vector<Color> getColors(int pairs)
|
||||
{
|
||||
if (pairs >10) pairs = 10;
|
||||
std::vector<Color> returnColors;
|
||||
Color colors[] = {
|
||||
{230, 25, 75, 255}, // Red
|
||||
|
||||
3
main.cpp
3
main.cpp
@ -24,7 +24,8 @@ int main()
|
||||
camera.fovy = 45.0f;
|
||||
camera.projection = CAMERA_PERSPECTIVE;
|
||||
|
||||
int cubePairs = 3; //Cube count => 2*cubePairs
|
||||
int cubePairs = 7;
|
||||
if (cubePairs > 10 || cubePairs <= 1) cubePairs = 3;
|
||||
std::vector<Vec3> positions =createCubes(cubePairs);
|
||||
|
||||
// Nur 3 Farben für 3 Paare
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user