Skip to content

Commit

Permalink
Merge develop branch into Master branch - Release v1.3.0 (#8)
Browse files Browse the repository at this point in the history
- Implementation of main arguments.
  • Loading branch information
hozlucas28 authored Oct 11, 2024
2 parents 0c756ec + fbb22bf commit 8cd9ebf
Show file tree
Hide file tree
Showing 24 changed files with 328 additions and 76 deletions.
6 changes: 3 additions & 3 deletions libs/game/macros.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef GAME_MACROS_H_INCLUDED
#define GAME_MACROS_H_INCLUDED
#ifndef LIBS_GAME_MACROS_H_INCLUDED
#define LIBS_GAME_MACROS_H_INCLUDED

/**
* @def DASHBOARD_ROWS
Expand Down Expand Up @@ -68,4 +68,4 @@
*/
#define NEIGHBORHOOD_RADIUS 1

#endif // GAME_MACROS_H_INCLUDED
#endif // LIBS_GAME_MACROS_H_INCLUDED
6 changes: 3 additions & 3 deletions libs/game/main.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

#ifndef GAME_MAIN_H_INCLUDED
#define GAME_MAIN_H_INCLUDED
#ifndef LIBS_GAME_MAIN_H_INCLUDED
#define LIBS_GAME_MAIN_H_INCLUDED

// Root
#include "./macros.h"
#include "./methods.h"
#include "./structs.h"

#endif // GAME_MAIN_H_INCLUDED
#endif // LIBS_GAME_MAIN_H_INCLUDED
7 changes: 6 additions & 1 deletion libs/game/methods.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

#ifndef LIBS_GAME_METHODS_H_INCLUDED
#define LIBS_GAME_METHODS_H_INCLUDED

#include "../patterns/main.h"
#include "./structs.h"

Expand Down Expand Up @@ -105,4 +108,6 @@ void setDashboardCenter(TGame* pGame);
*
* @warning This function assumes that `pGame` has been properly initialized.
*/
void startGameByConsole(TGame* pGame, int maxGeneration, int delayBetweenGenerations);
void startGameByConsole(TGame* pGame, int maxGeneration, int delayBetweenGenerations);

#endif // LIBS_GAME_MAIN_H_INCLUDED
8 changes: 4 additions & 4 deletions libs/game/structs.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

#include "../main.h"
#ifndef LIBS_GAME_STRUCTS_H_INCLUDED
#define LIBS_GAME_STRUCTS_H_INCLUDED

#ifndef GAME_STRUCTS_H_INCLUDED
#define GAME_STRUCTS_H_INCLUDED
#include "../main.h"

/**
* @struct TGame
Expand All @@ -25,4 +25,4 @@ typedef struct {
int delayBetweenGenerations; /** Delay time in milliseconds for processed the next generation.*/
} TGame;

#endif // GAME_STRUCTS_H_INCLUDED
#endif // LIBS_GAME_STRUCTS_H_INCLUDED
12 changes: 9 additions & 3 deletions libs/macros.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@

#ifndef MACROS_H_INCLUDED
#define MACROS_H_INCLUDED
#ifndef LIBS_MACROS_H_INCLUDED
#define LIBS_MACROS_H_INCLUDED

// TODO: Documentation
#define MAX(a, b) a > b ? a : b;

// TODO: Documentation
#define MIN(a, b) a > b ? b : a;

/**
* @def MAXIMUM_DELAY
Expand All @@ -24,4 +30,4 @@
*/
#define MINIMUM_DELAY 0

#endif // MACROS_H_INCLUDED
#endif // LIBS_MACROS_H_INCLUDED
6 changes: 3 additions & 3 deletions libs/main.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef MAIN_H_INCLUDED
#define MAIN_H_INCLUDED
#ifndef LIBS_MAIN_H_INCLUDED
#define LIBS_MAIN_H_INCLUDED

// Root
#include "./macros.h"
Expand All @@ -13,4 +13,4 @@
// Patterns
#include "./patterns/main.h"

#endif // MAIN_H_INCLUDED
#endif // LIBS_MAIN_H_INCLUDED
6 changes: 3 additions & 3 deletions libs/patterns/constructors.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef PATTERNS_CONSTRUCTORS_H_INCLUDED
#define PATTERNS_CONSTRUCTORS_H_INCLUDED
#ifndef LIBS_PATTERNS_CONSTRUCTORS_H_INCLUDED
#define LIBS_PATTERNS_CONSTRUCTORS_H_INCLUDED

#include "./structs.h"

Expand Down Expand Up @@ -48,4 +48,4 @@ void newPressPattern(TPattern* pattern);
*/
void newToadPattern(TPattern* pattern);

#endif // PATTERNS_CONSTRUCTORS_H_INCLUDED
#endif // LIBS_PATTERNS_CONSTRUCTORS_H_INCLUDED
6 changes: 3 additions & 3 deletions libs/patterns/macros.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef PATTERNS_MACROS_H_INCLUDED
#define PATTERNS_MACROS_H_INCLUDED
#ifndef LIBS_PATTERNS_MACROS_H_INCLUDED
#define LIBS_PATTERNS_MACROS_H_INCLUDED

/**
* @def PATTERN_ROWS
Expand All @@ -26,4 +26,4 @@
*/
#define PATTERN_COLS 36

#endif // PATTERNS_MACROS_H_INCLUDED
#endif // LIBS_PATTERNS_MACROS_H_INCLUDED
6 changes: 3 additions & 3 deletions libs/patterns/main.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

#ifndef PATTERNS_MAIN_H_INCLUDED
#define PATTERNS_MAIN_H_INCLUDED
#ifndef LIBS_PATTERNS_MAIN_H_INCLUDED
#define LIBS_PATTERNS_MAIN_H_INCLUDED

// Root
#include "./constructors.h"
#include "./macros.h"
#include "./methods.h"
#include "./structs.h"

#endif // PATTERNS_MAIN_H_INCLUDED
#endif // LIBS_PATTERNS_MAIN_H_INCLUDED
6 changes: 3 additions & 3 deletions libs/patterns/methods.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef PATTERNS_METHODS_H_INCLUDED
#define PATTERNS_METHODS_H_INCLUDED
#ifndef LIBS_PATTERNS_METHODS_H_INCLUDED
#define LIBS_PATTERNS_METHODS_H_INCLUDED

#include "./structs.h"

Expand Down Expand Up @@ -33,4 +33,4 @@ void printPatternByConsole(TPattern* pPattern);
*/
void setPatternCenter(TPattern* pPattern);

#endif // PATTERNS_METHODS_H_INCLUDED
#endif // LIBS_PATTERNS_METHODS_H_INCLUDED
6 changes: 3 additions & 3 deletions libs/patterns/structs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef PATTERNS_STRUCTS_H_INCLUDED
#define PATTERNS_STRUCTS_H_INCLUDED
#ifndef LIBS_PATTERNS_STRUCTS_H_INCLUDED
#define LIBS_PATTERNS_STRUCTS_H_INCLUDED

#include "./macros.h"

Expand All @@ -18,4 +18,4 @@ typedef struct {
int center[2]; /** Array (row, and column) representing the center of the pattern. */
} TPattern;

#endif // PATTERNS_STRUCTS_H_INCLUDED
#endif // LIBS_PATTERNS_STRUCTS_H_INCLUDED
6 changes: 3 additions & 3 deletions libs/utilities.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef UTILITIES_H_INCLUDED
#define UTILITIES_H_INCLUDED
#ifndef LIBS_UTILITIES_H_INCLUDED
#define LIBS_UTILITIES_H_INCLUDED

#include <stdlib.h>

Expand Down Expand Up @@ -134,4 +134,4 @@ void trimLeftStr(char* str);
*/
void trimRightStr(char* str);

#endif // UTILITIES_H_INCLUDED
#endif // LIBS_UTILITIES_H_INCLUDED
6 changes: 3 additions & 3 deletions libs/validators.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef VALIDATORS_H_INCLUDED
#define VALIDATORS_H_INCLUDED
#ifndef LIBS_VALIDATORS_H_INCLUDED
#define LIBS_VALIDATORS_H_INCLUDED

/**
* @brief Validates a delay.
Expand Down Expand Up @@ -50,4 +50,4 @@ int validatePattern(char* pattern);
*/
int validatePlatform(char* platform);

#endif // VALIDATORS_H_INCLUDED
#endif // LIBS_VALIDATORS_H_INCLUDED
7 changes: 7 additions & 0 deletions src/macros.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef SRC_MACROS_H_INCLUDED
#define SRC_MACROS_H_INCLUDED

// TODO: Documentation
#define CELL_SIZE 10

#endif // SRC_MACROS_H_INCLUDED
Loading

0 comments on commit 8cd9ebf

Please sign in to comment.