Finalize the implementation of the playable shots list displaying
[Project_algorithmic_C.git] / src / main.c
index 224e35cbf347d2ef8331aa9d50ef4fe4d1589c19..a86a7efd94f125123d6aca435bfb62fdde7599b8 100644 (file)
@@ -77,7 +77,11 @@ int main() {
         mvprintw(center_y, center_x - 42/2 - snprintf(NULL, 0, score_msg, "noirs", nb_black) - 2, score_msg, "noirs", nb_black);
         mvprintw(center_y, center_x + 42/2 + 2, score_msg, "blancs", nb_white);
 
-        //display_array(1, 1, pawns);
+        build_playable_shots_list(player, &playable_shots, pawns);
+        print_shots_list(board_center_y, board_center_x, &playable_shots);
+        free_shots_list(&playable_shots);
+
+        display_array(1, 1, pawns);
 
         int y;
         char x_char;
@@ -85,7 +89,7 @@ int main() {
         unsigned int nb_pawns_reversed = 0;
         do {
             y = 0;
-            x_char = "";
+            x_char = (char)"";
             const char* prompt_msg = "Prochain pion ? (ligne colonne - chiffre lettre):";
             int prmt_rt = prompt_values(stdscr, center_y + 26/2 + 1, (center_x - strlen(prompt_msg)/2), prompt_msg, &y, &x_char);
             int x = map_col_letter_to_index(x_char);