Skip to content

Commit 963b9c4

Browse files
committed
doc: add documentation for generateNextGeneration and printGameByConsole functions
1 parent 8f8a5fb commit 963b9c4

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

libs/game/methods.h

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,16 @@ void drawPatternInDashboard(TGame* pGame, TPattern* pPattern);
5353
*/
5454
void fillDashboard(TGame* pGame, char with);
5555

56-
// TODO: Documentation
56+
/**
57+
* @brief Generates the next generation of a Conway's Game of Life.
58+
*
59+
* This function updates the `dashboard` field inside a Conway's Game of Life structure to the next
60+
* generation based on the current state.
61+
*
62+
* @param pGame A pointer to the Conway's Game of Life structure.
63+
*
64+
* @warning This function assumes that `pGame` has been properly initialized.
65+
*/
5766
void generateNextGeneration(TGame* pGame);
5867

5968
/**
@@ -65,7 +74,16 @@ void generateNextGeneration(TGame* pGame);
6574
*/
6675
void printDashboardByConsole(TGame* pGame);
6776

68-
// TODO: Documentation
77+
/**
78+
* @brief Prints a Conway's Game of Life by console.
79+
*
80+
* This function takes a pointer to a Conway's Game of Life structure and prints its details
81+
* to the console.
82+
*
83+
* @param pGame A pointer to the Conway's Game of Life structure.
84+
*
85+
* @warning This function assumes that `pGame` has been properly initialized.
86+
*/
6987
void printGameByConsole(TGame* pGame);
7088

7189
/**

0 commit comments

Comments
 (0)