#include "algorithm.c" // gcc -g -Wall -Wextra -Wpedantic main.c -lSDL2 -lSDL2_image -lm -o main int main() { if (SDL_Init(SDL_INIT_EVERYTHING) != 0) { printf("error initializing SDL: %s\n", SDL_GetError()); } SDL_Window* win = SDL_CreateWindow("a game", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, 0); Uint32 render_flags = SDL_RENDERER_ACCELERATED; SDL_Renderer* rend = SDL_CreateRenderer(win, -1, render_flags); SDL_SetRenderDrawBlendMode(rend, SDL_BLENDMODE_BLEND); creneau* edt = import_creneaux("file.txt", 112); int len_creneau = 112; //printf("%d %d %d %d\n", edt[10].date.hour, edt[10].date.day, edt[10].date.month, edt[10].date.year); date d1 = {18, 12, 2, 2024}; //printf("%d\n", date_dist(d1, d1)); //printf("%d %d %d %d\n", edt[70].date.hour, edt[70].date.day, edt[70].date.month, edt[70].date.year); //print_one_week(rend, edt, 112, d1); /* edt[6].group = 1; edt[6].mat = INFO; edt[20].group = 1; edt[20].mat = PHYSICS; edt[1].group = 1; edt[1].mat = ENGLISH; edt[21].group = 1; edt[21].mat = MATH; is_allowed_MP2I(edt,len_creneau, 1, d1); */ /* date d1 = {19, 1, 3, 2024}; date d2 = {18, 1, 4, 2024}; printf("%d\n", date_dist(d1, d2)); */ free(edt); SDL_DestroyRenderer(rend); SDL_DestroyWindow(win); SDL_Quit(); return 0; }