42 lines
1.0 KiB
C
42 lines
1.0 KiB
C
#include <stdio.h>
|
|
|
|
#include "algorithm.c"
|
|
|
|
// gcc -g -Wall -Wextra -Wpedantic main.c -lSDL2 -lSDL2_image -lm -o main
|
|
|
|
int main(int argc, char **argv) {
|
|
if (argc!=4) {
|
|
fprintf(stderr, "Usage: %s <creneaux> <colleurs> <output>\n", argv[0]);
|
|
exit(1);
|
|
}
|
|
|
|
char* path_creneaux = argv[1];
|
|
char* path_colleurs = argv[2];
|
|
char* path_output = argv[3];
|
|
|
|
printf("Starting\n");
|
|
srand(time(NULL));
|
|
|
|
//creneau* edt = import_creneaux("file.txt", 76);
|
|
creneau* edt = import_creneaux_oneweek(path_creneaux, 33, 6);
|
|
int len_edt = 33*6;
|
|
|
|
//colleur* dudes = import_colleurs("some_data.txt", 13, len_creneau);
|
|
colleur* dudes = import_colleurs_oneweek(path_colleurs, 16, 6, 33);
|
|
int n_colleurs = 16;
|
|
|
|
aux_2(edt, len_edt, dudes, n_colleurs, 15, 6, 5000, path_output);
|
|
|
|
for(int i = 0; i < len_edt; i++) {
|
|
free(edt[i].name);
|
|
}
|
|
free(edt);
|
|
|
|
for(int i = 0; i < n_colleurs; i++) {
|
|
free(dudes[i].disp);
|
|
free(dudes[i].name);
|
|
}
|
|
free(dudes);
|
|
return 0;
|
|
}
|