From: Jérôme Benoit Date: Wed, 22 Mar 2017 22:48:08 +0000 (+0100) Subject: TP 13 exo2: Code cleanups X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=8f8629b25f848dcf37e4786e4c3d5af60e3de37f;p=TD_C.git TP 13 exo2: Code cleanups Signed-off-by: Jérôme Benoit --- diff --git a/TP_13/exo2/lib/coordinates.c b/TP_13/exo2/lib/coordinates.c index 624de14..2f02405 100644 --- a/TP_13/exo2/lib/coordinates.c +++ b/TP_13/exo2/lib/coordinates.c @@ -18,8 +18,6 @@ #include "coordinates.h" -#include - void init_coordinates(coordinates_t* coordinates_array) { for (unsigned i = 0; i < MAX_COORDINATES; i++) { diff --git a/TP_13/exo2/lib/display.c b/TP_13/exo2/lib/display.c index 21d85bb..c04b51b 100644 --- a/TP_13/exo2/lib/display.c +++ b/TP_13/exo2/lib/display.c @@ -23,6 +23,7 @@ /* in all print routine, y and x are the coordinates of the first character of the shape * which can be a space ' ' */ +/* FIXME: one can split this shape in building blocks and build it using them */ void print_board(int y, int x) { mvprintw(y, x, " | |"); @@ -97,19 +98,3 @@ void print_coordinates(coordinates_t coordinates_array[], int base_y, int base_x i++; } } - -/* void printf_result(unsigned player, unsigned round) { - char* result_msg = ""; - - if (round < MAX_COORDINATES + 1) { - if (player == 0) { - result_msg = "Joueur 1"; - } else { - result_msg = "Joueur 2"; - } - printf("%s gagne !\n", result_msg); - } else { - printf("Egalite !\n"); - } -} */ - diff --git a/TP_13/exo2/lib/display.h b/TP_13/exo2/lib/display.h index 762c908..3967116 100644 --- a/TP_13/exo2/lib/display.h +++ b/TP_13/exo2/lib/display.h @@ -26,6 +26,5 @@ void print_board(int y, int x); void print_coordinates(coordinates_t coordinates_array[], int base_y, int base_x); /* non ncurses printing */ -/* void printf_result(unsigned player, unsigned round); */ #endif /* DISPLAY_H */