Spell fix in comment.
[TD_C.git] / TP_13 / exo2 / lib / coordinates.c
index 3aaadd4ba8016e44ba852c68b20ae0aba19e3bfc..fc5cb4f3ea50f3d2f7dcce179a672759ae7b7027 100644 (file)
 
 #include "coordinates.h"
 
-void init_coordinates(coordinates_t* coordinates_array) {
+void zero_coordinates(coordinates_t* coordinates_array) {
 
     for (unsigned i = 0; i < MAX_COORDINATES; i++) {
         coordinates_array[i] = set_coordinates(0, 0, 0);
     }
 }
 
-void reinit_coordinates(coordinates_t* coordinates_array) {
-
-    init_coordinates(coordinates_array);
-}
-
 coordinates_t set_coordinates(int y, int x, unsigned type) {
     coordinates_t new_coordinates;
 
@@ -42,7 +37,7 @@ coordinates_t set_coordinates(int y, int x, unsigned type) {
 /* FIXME: Does it worth doing a coordinates_t get_coordinates(int y, int x, unsigned type); helper function? */
 /* Or a int get_coordinates_x(coordinates_t coordinates); helper function? */
 
-/* the function do a lot of sanity checks before adding new board elements,
+/* this function do a lot of sanity checks before adding new board elements,
  * hence the loop. moving the checks in the main loop is also possible.
  * for now, just branch in the main loop given this function error value returned. */
 unsigned add_coordinates(coordinates_t new_coordinates, coordinates_t* coordinates_array, unsigned round) {