TP 13 exo2: Fix the beginning round of winning conditions check
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 22 Mar 2017 22:32:31 +0000 (23:32 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 22 Mar 2017 22:32:31 +0000 (23:32 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
TP_13/exo2/lib/coordinates.c

index 0a2d5e028c406579b8da3c3509727463fee1710e..624de14df11ad3715e57f19d505fced123191cdf 100644 (file)
@@ -131,8 +131,8 @@ static bool chk_diagonals(coordinates_t* coordinates_array, unsigned round) {
 
 bool chk_win_conditions(coordinates_t* coordinates_array, unsigned round) {
 
-    /* winning conditions begin at round = 4 */
-    if (round > 3) {
+    /* winning conditions begin at round = 5 */
+    if (round > 4) {
         if (chk_diagonals(coordinates_array, round)) {
             return true;
         }