diff --git a/puissance4.c b/puissance4.c index 78e3ce1e7fac8db72c2babda8f47201c116cd512..45b15bbf699295f7d65b2d74f3f3e65e02df7fde 100644 --- a/puissance4.c +++ b/puissance4.c @@ -24,7 +24,7 @@ bool validate_arguments(char const* argv[], int* game_mode, int* row_count, int* int main(int argc, char const* argv[]) { if (argc != 4) { print_usage(argv[0]); - return false; + return EXIT_FAILURE; } int game_mode, row_count, col_count; diff --git a/src/board/board.c b/src/board/board.c index 8abebe69ac6ddae43485755982eb7f9e5b9f5f07..18e751ecf50dce7f2fc6b5368f97ba0296606b3d 100644 --- a/src/board/board.c +++ b/src/board/board.c @@ -19,13 +19,10 @@ int destroy_board(int rows, int** board) { void print_board(int rows, int cols, int** board) { for (int row = -1; row <= rows; row++) { if (row == -1) { - // Top border of the board printf("\nā"); } else if (row == rows) { - // Bottom border of the board printf("ā"); } else { - // Print left vertical border printf("ā"); } diff --git a/src/board/test_board.h b/src/board/test_board.h index 4e2d839c5f5e0f33bf153df7605775af5818ce78..542c4d5aa23666a4ab976784aa14cab77b8c2df4 100644 --- a/src/board/test_board.h +++ b/src/board/test_board.h @@ -1,6 +1,11 @@ #ifndef _TEST_BOARD_H_ #define _TEST_BOARD_H_ +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <string.h> + #include "board.h" #include "../test_puissance4.h" diff --git a/src/computer/test_computer.h b/src/computer/test_computer.h index 75997aa485762d752b4b0b66356dee8476b76a44..a56c48372575a7ccb39af3cd12fd5fc22f633aab 100644 --- a/src/computer/test_computer.h +++ b/src/computer/test_computer.h @@ -1,6 +1,11 @@ #ifndef _TEST_COMPUTER_H_ #define _TEST_COMPUTER_H_ +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <string.h> + #include "computer.h" #include "../game/game.h" #include "../test_puissance4.h" diff --git a/src/game/game.h b/src/game/game.h index f550bf2cd21e65126bf763b084516e1983d8f627..efe0c76f391961c3f87621c60076771cb7654db0 100644 --- a/src/game/game.h +++ b/src/game/game.h @@ -1,5 +1,5 @@ -#ifndef _GAME_H -#define _GAME_H +#ifndef _GAME_H_ +#define _GAME_H_ #include <stdbool.h> #include <stdio.h> diff --git a/src/game/test_game.h b/src/game/test_game.h index 2e775afa0fe48c8ec8528360dda706058ecc0c99..b2ba51c112facb1d96f63e2f87d6db7eaf216e36 100644 --- a/src/game/test_game.h +++ b/src/game/test_game.h @@ -1,6 +1,11 @@ #ifndef _TEST_GAME_H_ #define _TEST_GAME_H_ +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <string.h> + #include "game.h" #include "../computer/computer.h" #include "../test_puissance4.h"