Skip to content

Commit 8cd9ebf

Browse files
authored
Merge develop branch into Master branch - Release v1.3.0 (#8)
- Implementation of main arguments.
2 parents 0c756ec + fbb22bf commit 8cd9ebf

24 files changed

+328
-76
lines changed

libs/game/macros.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
#ifndef GAME_MACROS_H_INCLUDED
3-
#define GAME_MACROS_H_INCLUDED
2+
#ifndef LIBS_GAME_MACROS_H_INCLUDED
3+
#define LIBS_GAME_MACROS_H_INCLUDED
44

55
/**
66
* @def DASHBOARD_ROWS
@@ -68,4 +68,4 @@
6868
*/
6969
#define NEIGHBORHOOD_RADIUS 1
7070

71-
#endif // GAME_MACROS_H_INCLUDED
71+
#endif // LIBS_GAME_MACROS_H_INCLUDED

libs/game/main.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

2-
#ifndef GAME_MAIN_H_INCLUDED
3-
#define GAME_MAIN_H_INCLUDED
2+
#ifndef LIBS_GAME_MAIN_H_INCLUDED
3+
#define LIBS_GAME_MAIN_H_INCLUDED
44

55
// Root
66
#include "./macros.h"
77
#include "./methods.h"
88
#include "./structs.h"
99

10-
#endif // GAME_MAIN_H_INCLUDED
10+
#endif // LIBS_GAME_MAIN_H_INCLUDED

libs/game/methods.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11

2+
#ifndef LIBS_GAME_METHODS_H_INCLUDED
3+
#define LIBS_GAME_METHODS_H_INCLUDED
4+
25
#include "../patterns/main.h"
36
#include "./structs.h"
47

@@ -105,4 +108,6 @@ void setDashboardCenter(TGame* pGame);
105108
*
106109
* @warning This function assumes that `pGame` has been properly initialized.
107110
*/
108-
void startGameByConsole(TGame* pGame, int maxGeneration, int delayBetweenGenerations);
111+
void startGameByConsole(TGame* pGame, int maxGeneration, int delayBetweenGenerations);
112+
113+
#endif // LIBS_GAME_MAIN_H_INCLUDED

libs/game/structs.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

2-
#include "../main.h"
2+
#ifndef LIBS_GAME_STRUCTS_H_INCLUDED
3+
#define LIBS_GAME_STRUCTS_H_INCLUDED
34

4-
#ifndef GAME_STRUCTS_H_INCLUDED
5-
#define GAME_STRUCTS_H_INCLUDED
5+
#include "../main.h"
66

77
/**
88
* @struct TGame
@@ -25,4 +25,4 @@ typedef struct {
2525
int delayBetweenGenerations; /** Delay time in milliseconds for processed the next generation.*/
2626
} TGame;
2727

28-
#endif // GAME_STRUCTS_H_INCLUDED
28+
#endif // LIBS_GAME_STRUCTS_H_INCLUDED

libs/macros.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11

2-
#ifndef MACROS_H_INCLUDED
3-
#define MACROS_H_INCLUDED
2+
#ifndef LIBS_MACROS_H_INCLUDED
3+
#define LIBS_MACROS_H_INCLUDED
4+
5+
// TODO: Documentation
6+
#define MAX(a, b) a > b ? a : b;
7+
8+
// TODO: Documentation
9+
#define MIN(a, b) a > b ? b : a;
410

511
/**
612
* @def MAXIMUM_DELAY
@@ -24,4 +30,4 @@
2430
*/
2531
#define MINIMUM_DELAY 0
2632

27-
#endif // MACROS_H_INCLUDED
33+
#endif // LIBS_MACROS_H_INCLUDED

libs/main.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
#ifndef MAIN_H_INCLUDED
3-
#define MAIN_H_INCLUDED
2+
#ifndef LIBS_MAIN_H_INCLUDED
3+
#define LIBS_MAIN_H_INCLUDED
44

55
// Root
66
#include "./macros.h"
@@ -13,4 +13,4 @@
1313
// Patterns
1414
#include "./patterns/main.h"
1515

16-
#endif // MAIN_H_INCLUDED
16+
#endif // LIBS_MAIN_H_INCLUDED

libs/patterns/constructors.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
#ifndef PATTERNS_CONSTRUCTORS_H_INCLUDED
3-
#define PATTERNS_CONSTRUCTORS_H_INCLUDED
2+
#ifndef LIBS_PATTERNS_CONSTRUCTORS_H_INCLUDED
3+
#define LIBS_PATTERNS_CONSTRUCTORS_H_INCLUDED
44

55
#include "./structs.h"
66

@@ -48,4 +48,4 @@ void newPressPattern(TPattern* pattern);
4848
*/
4949
void newToadPattern(TPattern* pattern);
5050

51-
#endif // PATTERNS_CONSTRUCTORS_H_INCLUDED
51+
#endif // LIBS_PATTERNS_CONSTRUCTORS_H_INCLUDED

libs/patterns/macros.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
#ifndef PATTERNS_MACROS_H_INCLUDED
3-
#define PATTERNS_MACROS_H_INCLUDED
2+
#ifndef LIBS_PATTERNS_MACROS_H_INCLUDED
3+
#define LIBS_PATTERNS_MACROS_H_INCLUDED
44

55
/**
66
* @def PATTERN_ROWS
@@ -26,4 +26,4 @@
2626
*/
2727
#define PATTERN_COLS 36
2828

29-
#endif // PATTERNS_MACROS_H_INCLUDED
29+
#endif // LIBS_PATTERNS_MACROS_H_INCLUDED

libs/patterns/main.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

2-
#ifndef PATTERNS_MAIN_H_INCLUDED
3-
#define PATTERNS_MAIN_H_INCLUDED
2+
#ifndef LIBS_PATTERNS_MAIN_H_INCLUDED
3+
#define LIBS_PATTERNS_MAIN_H_INCLUDED
44

55
// Root
66
#include "./constructors.h"
77
#include "./macros.h"
88
#include "./methods.h"
99
#include "./structs.h"
1010

11-
#endif // PATTERNS_MAIN_H_INCLUDED
11+
#endif // LIBS_PATTERNS_MAIN_H_INCLUDED

libs/patterns/methods.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
#ifndef PATTERNS_METHODS_H_INCLUDED
3-
#define PATTERNS_METHODS_H_INCLUDED
2+
#ifndef LIBS_PATTERNS_METHODS_H_INCLUDED
3+
#define LIBS_PATTERNS_METHODS_H_INCLUDED
44

55
#include "./structs.h"
66

@@ -33,4 +33,4 @@ void printPatternByConsole(TPattern* pPattern);
3333
*/
3434
void setPatternCenter(TPattern* pPattern);
3535

36-
#endif // PATTERNS_METHODS_H_INCLUDED
36+
#endif // LIBS_PATTERNS_METHODS_H_INCLUDED

0 commit comments

Comments
 (0)