12 bool exit_condition
= false;
15 if (has_colors() == false) {
17 printf("Votre terminal ne supporte pas les couleurs\n");
21 getmaxyx(stdscr
, row
, col
);
25 /* center the board */
26 int center_board_y
= row
/2 - 23/2;
27 int center_board_x
= col
/2 - 41/2;
30 print_board(center_board_y
, center_board_x
);
32 key_pressed
= getch();
33 if (key_pressed
== 'q') {
34 exit_condition
= true;
36 } while (!exit_condition
);