11 bool exit_condition
= false;
14 if (has_colors() == false) {
16 printf("Votre terminal ne supporte pas les couleurs\n");
20 getmaxyx(stdscr
, row
, col
);
24 /* center the board */
25 int center_board_y
= row
/2 - 23/2;
26 int center_board_x
= col
/2 - 40/2;
29 print_board(center_board_y
, center_board_x
);
31 key_pressed
= getch();
32 if (key_pressed
== 'q') {
33 exit_condition
= true;
35 } while (!exit_condition
);