char* exit_msg = malloc(str_max_length * sizeof(char));
initscr();
+ if (has_colors() == false) {
+ endwin();
+ printf("Votre terminal ne supporte pas les couleurs.\n");
+ exit(EXIT_FAILURE);
+ }
+ start_color();
getmaxyx(stdscr, row, col);
noecho();
curs_set(0);
/* array of the active coordinates in the entered order */
- coordinates_t coordinates_array[MAX_COORDINATES];
- init_coordinates(coordinates_array);
+ coordinates_t coordinates_array[MAX_COORDINATES] = {
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0}
+ };
coordinates_t new_coordinates = {0, 0, 0};
/* center base coordinates for the board */
round = 0;
player = 0;
errno = 0;
- reinit_coordinates(coordinates_array);
+ zero_coordinates(coordinates_array);
winning_condition = false;
loop_exit_condition = false;
clear();