#include "createCube.h" #include std::vector createCubes(int pairs) { std::vector fieldSize = calculateFieldSize(pairs); std::vector cubePositions; //std::cout<<(fieldSize[0])< calculateFieldSize(int pairs) { std::vector best_field = {pairs, 2}; int cube_count = pairs *2; int test_count = 3; while (test_count < pairs) { for (int i = 3; i < pairs; i++) { if (test_count * i == cube_count && test_count + i < best_field[0] + best_field[1]) { best_field[1] = test_count; best_field[0] = i; } } test_count++; } return best_field; }; std::vector getColors(int pairs) { std::vector returnColors; Color colors[] = { {230, 25, 75, 255}, // Red {60, 180, 75, 255}, // Green {0, 130, 200, 255}, // Blue {245, 130, 48, 255}, // Orange {145, 30, 180, 255}, // Purple {255, 225, 25, 255}, // Yellow {70, 240, 240, 255}, // Cyan {240, 50, 230, 255}, // Magenta {210, 245, 60, 255}, // Lime {250, 190, 190, 255} // Pink }; for (int i = 0; i < pairs; i++) { returnColors.push_back(colors[i]); } std::cout << returnColors.size() << std::endl; return returnColors; };