30 lines
680 B
C++
30 lines
680 B
C++
#include <iostream>
|
|
|
|
#include "DLASystem.h"
|
|
|
|
int main(int argc, char **argv) {
|
|
if (argc != 5) {
|
|
cerr << "Usage " << argv[0] << " <seed> <maxParticles> <stickProbability> <csvPath>" << endl;
|
|
return 1;
|
|
}
|
|
|
|
int seed = std::stoi(argv[1]);
|
|
int maxParticles = std::stoi(argv[2]);
|
|
double stickProbability = std::stod(argv[3]);
|
|
string csvPath = argv[4];
|
|
std::cerr << "Setting seed " << seed << endl;
|
|
|
|
// create the system
|
|
auto *sys = new DLASystem(maxParticles, csvPath, stickProbability);
|
|
sys->setSeed(seed);
|
|
sys->running = true;
|
|
|
|
while (sys->running) {
|
|
sys->update();
|
|
}
|
|
|
|
sys->exportData();
|
|
|
|
return 0;
|
|
}
|