repositories
/
TD_C.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TP_13 exo2: use C99 struct initializers
[TD_C.git]
/
TP_13
/
exo2
/
src
/
main.c
diff --git
a/TP_13/exo2/src/main.c
b/TP_13/exo2/src/main.c
index d57be23271c7e3d812ee9fba647d722fd4e7a02f..854ddb9c1e52d9dd6a90622eda0b11120080e55b 100644
(file)
--- a/
TP_13/exo2/src/main.c
+++ b/
TP_13/exo2/src/main.c
@@
-22,8
+22,17
@@
int main() {
curs_set(0);
/* array of the active coordinates in the entered order */
curs_set(0);
/* array of the active coordinates in the entered order */
- coordinates_t coordinates_array[MAX_COORDINATES];
- init_coordinates(coordinates_array);
+ coordinates_t coordinates_array[MAX_COORDINATES] = {
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0},
+ {0, 0, 0}
+ };
coordinates_t new_coordinates = {0, 0, 0};
/* center base coordinates for the board */
coordinates_t new_coordinates = {0, 0, 0};
/* center base coordinates for the board */
@@
-130,7
+139,7
@@
int main() {
round = 0;
player = 0;
errno = 0;
round = 0;
player = 0;
errno = 0;
-
reinit
_coordinates(coordinates_array);
+
zero
_coordinates(coordinates_array);
winning_condition = false;
loop_exit_condition = false;
clear();
winning_condition = false;
loop_exit_condition = false;
clear();