Skip to content

Commit e9b71ad

Browse files
hozlucas28tefhuergoGuidolinaresTiagoGiannotti
authored
Merge develop branch into Master branch - Release v1.0.0 (#3)
* guido first commit * fix: remove unnecessary functions * Update utilities.c * fix: remove unnecessary function * fix(ci): format code action * test(ci): test format-code action * fix(ci): format code action * test(ci): test format-code action * ci: format code * Definition of variables * ci: format code * fix(vscode): vscode configurations * feature(macros): add ROWS and COLS * feature: add new utilities functions * test(ci): format code action * ci: format code * doc: add development team * doc: improve doxygen documentation * feature: improve `getUserInputStr` function * feature: improve functions * feature: reduce `strLength` * todo: add new todos (comments) * feature(getUserInputStr): add `onInvalidMessage` parameter * fix(strcmpi): function behavior * fix(ci): prevent commit if there are no changes * doc(getUserInputStr): add missing parameter * ci: format code * todo: remove overhead todo * feature(main): improve `getUserInputStr` function arguments * todo: remove overhead todo * test(ci): format code action * ci: format code * functions pattern * ci: format code * refactor: move `validatePattern` from `src` project to `libs` project * todo: add new todos * feature(macros): add new macros * fix(gitignore): untrack personal files * refactor: move `validatePattern` function to `validators` files * feature(vscode): compile `validators.c` file * ci: format code * doc: add missing files * feature(TGame): add `generation` field * fix(todos): improve `drawPattern` and `drawPatternInDashboard` todos * remove: unnecessary variable * feature(clang-format): add `ColumnLimit` * fix: remove conflicted settings * feature/refactor: several features and refactors * fix(vscode): fix paths * doc: update `Application Structure` section * doc(TPattern): add missing documentation * doc(fillPattern): add missing documentation * doc(printPatternByConsole): add missing documentation * doc(main.h): add comment section * fix(doc): add missing backticks * doc(macros.h): add missing documentations * doc(newGliderPattern): add missing documentation * doc(newGliderCannonPattern): add missing documentation * doc(newGliderPattern): improve documentation * doc(newPressPattern): add missing documentation * doc(newGliderCannonPattern): improve documentation * doc(newGliderPattern): improve the documentation * doc(newGliderCannonPattern): improve documentation * doc(newPressPattern): improve documentation * doc(newToadPattern): add missing documentation * fix(drawPattern): add invalid pattern behaviour * doc(drawPattern): add missing documentation * doc(drawPatternInDashboard): add missing documentation * fix(newGliderCannonPattern): update `rows` value * feature(validateGeneration): create generation validator * feature: request maximum generation * feature: create delay macros * doc(dashboard): improve the documentation * feature(validateDelay): create validation delay * fix(validateGeneration): prevent digits * fix(validateGeneration): allow `-` char * feature: request delay * doc: add divider comments * test(ci): test format action Co-authored-by: Tiago Giannotti <[email protected]> Co-authored-by: Guidolinares <[email protected]> * ci: format code * fix: remove unnecessary print Co-authored-by: Tiago Giannotti <[email protected]> Co-authored-by: Guidolinares <[email protected]> * feature: add new function and complete todos Co-authored-by: Tiago Giannotti <[email protected]> Co-authored-by: Guidolinares <[email protected]> * feature(constructors): call `setPatternCenter` on each constructor Co-authored-by: Tiago Giannotti <[email protected]> Co-authored-by: Guidolinares <[email protected]> * feature: create `setPatternCenter` function Co-authored-by: Tiago Giannotti <[email protected]> Co-authored-by: Guidolinares <[email protected]> * feature: add `center` field to `TPattern` structure Co-authored-by: Tiago Giannotti <[email protected]> Co-authored-by: Guidolinares <[email protected]> * feature: add `countNeighbors` function Co-authored-by: Tiago Giannotti <[email protected]> Co-authored-by: Guidolinares <[email protected]> * fix: remove unnecessary import Co-authored-by: Tiago Giannotti <[email protected]> Co-authored-by: Guidolinares <[email protected]> * feature(macros): add `NEIGHBORHOOD_RADIUS` macros Co-authored-by: Guidolinares <[email protected]> Co-authored-by: tefhuergo <[email protected]> Co-authored-by: Tiago Giannotti <[email protected]> * feature: create `validatePlatform` function Co-authored-by: Guidolinares <[email protected]> Co-authored-by: tefhuergo <[email protected]> Co-authored-by: Tiago Giannotti <[email protected]> * fix: rename parameter name Co-authored-by: Guidolinares <[email protected]> Co-authored-by: tefhuergo <[email protected]> Co-authored-by: Tiago Giannotti <[email protected]> * feature: add `ALIVE_CELL_NG` and `DEAD_CELL_NG` macros Co-authored-by: Guidolinares <[email protected]> Co-authored-by: tefhuergo <[email protected]> Co-authored-by: Tiago Giannotti <[email protected]> * feature: create functions to start the game by console Co-authored-by: Guidolinares <[email protected]> Co-authored-by: tefhuergo <[email protected]> Co-authored-by: Tiago Giannotti <[email protected]> * ci: format code * todo: create `todos.md` file * feature: complete todos Co-authored-by: Guidolinares <[email protected]> Co-authored-by: tefhuergo <[email protected]> Co-authored-by: Tiago Giannotti <[email protected]> * ci: format code * fix(ci): format code * fix(ci): remove pull request event and update `branch` input parameter * ci: create workflow to format code on pull request --------- Co-authored-by: EstefaniaHuergo <[email protected]> Co-authored-by: Guidolinares <[email protected]> Co-authored-by: Tiago Giannotti <[email protected]>
1 parent d2ac6a6 commit e9b71ad

28 files changed

+1213
-75
lines changed

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
---
22
BasedOnStyle: Google
3+
ColumnLimit: 100
34
IndentWidth: 4

.github/translations/es/README.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,17 @@ C-Practical-Work-2024/
9696
│ ├── main.h
9797
│ ├── utilities.c
9898
│ ├── utilities.h
99+
│ ├── validators.c
100+
│ ├── validators.h
99101
| |
100-
│ └── cells/
102+
│ └── patterns/
101103
│ ├── constructors.c
102104
│ ├── constructors.h
105+
│ ├── macros.h
106+
│ ├── main.h
103107
│ ├── methods.c
104-
│ └── methods.h
108+
│ ├── methods.h
109+
│ └── structs.h
105110
|
106111
├── .clang-format
107112
├── .gitignore
@@ -131,13 +136,18 @@ C-Practical-Work-2024/
131136
- **[main.h](./libs/main.h)** - Archivo que indexa todos los archivos `.h` del proyecto.
132137
- **[utilities.c](./libs/utilities.c)** - Archivo con el desarrollo de los prototipos de función presentes en `utilities.h`.
133138
- **[utilities.h](./libs/utilities.h)** - Archivo con las estructuras y los prototipos de función de uso común.
134-
135-
- **[cells](./libs/cells)** - Funciones y estructuras de las entidades `células`.
136-
137-
- **[constructors.c](./libs/cells/constructors.c)** - Archivo con el desarrollo de los prototipos de función presentes en `constructors.h`.
138-
- **[constructors.h](./libs/cells/constructors.h)** - Archivo con las estructuras y los prototipos de función relacionados a la creación de células.
139-
- **[methods.c](./libs/cells/methods.c)** - Archivo con el desarrollo de los prototipos de función presentes en `methods.h`.
140-
- **[methods.h](./libs/cells/methods.h)** - Archivo con los prototipos de función relacionados a los métodos de las células.
139+
- **[validators.c](./libs/validators.c)** - Archivo con el desarrollo de los prototipos de función presentes en `validators.h`.
140+
- **[validators.h](./libs/validators.h)** - Archivo con prototipos de funciones relacionadas con procesos de validación.
141+
142+
- **[patterns](./libs/patterns)** - Funciones y estructuras para crear patrones con células.
143+
144+
- **[constructors.c](./libs/patterns/constructors.c)** - Archivo con el desarrollo de los prototipos de función presentes en `constructors.h`.
145+
- **[constructors.h](./libs/patterns/constructors.h)** - Archivo con las estructuras y los prototipos de función relacionados a la creación de patrones.
146+
- **[macros.h](./libs/macros.h)** - Archivo con macros.
147+
- **[main.h](./libs/main.h)** - Archivo que indexa todos los archivos `.h` dentro de la carpeta `patterns`.
148+
- **[methods.c](./libs/patterns/methods.c)** - Archivo con el desarrollo de los prototipos de función presentes en `methods.h`.
149+
- **[methods.h](./libs/patterns/methods.h)** - Archivo con los prototipos de función relacionados a los métodos de los patrones.
150+
- **[structs.h](./libs/patterns/methods.h)** - Archivo con estructuras.
141151

142152
- **[.clang-format](./.clang-format)** - Archivo de configuración de la herramienta de formateo de código `clang-format`.
143153
- **[.gitignore](./.gitignore)** - Archivo de configuración de Git para evitar el rastreo de archivos no deseados.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: 'Format code on pull request'
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- Master
7+
- develop
8+
paths:
9+
- '**.c'
10+
- '**.h'
11+
12+
jobs:
13+
clang-format:
14+
name: Format code
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
ref: ${{github.head_ref}}
21+
22+
- name: Install clang-format (formatter tool)
23+
run: sudo apt-get install clang-format
24+
25+
- name: Run clang-format
26+
run: find . -name '*.c' -o -name '*.h' | xargs clang-format -i -style=file
27+
28+
- name: Commit changes
29+
run: |
30+
git config --global user.name 'github-actions[bot]'
31+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
32+
git add .
33+
git diff-index --quiet HEAD || git commit -m "ci: format code"
34+
35+
- name: Push changes
36+
uses: ad-m/[email protected]
37+
with:
38+
branch: ${{ github.head_ref }}
39+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/format-code.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
name: 'Format code'
22

33
on:
4-
pull_request:
5-
branches:
6-
- Master
7-
- develop
8-
paths:
9-
- '**.c'
10-
- '**.h'
114
push:
125
branches:
136
- Master

.gitignore

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

2+
# ---------------------------------------------------------------------------- #
3+
# PERSONAL FILES #
4+
# ---------------------------------------------------------------------------- #
5+
6+
personal-*.md
7+
8+
9+
210
# ---------------------------------------------------------------------------- #
311
# CODEBLOCKS #
412
# ---------------------------------------------------------------------------- #

.vscode/settings.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
"editor.minimap.renderCharacters": false,
1111
"emojisense.unicodeCompletionsEnabled": false,
1212
"files.associations": {"*.c": "c", "*.h": "c"},
13-
"files.autoSave": "afterDelay",
14-
"files.autoSaveDelay": 1000,
1513
"files.trimTrailingWhitespace": true,
1614
"markdown-preview-github-styles.colorTheme": "dark",
1715
"terminal.integrated.defaultProfile.windows": "Command Prompt",

.vscode/tasks.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
{
1515
"command": [
1616
"(gcc -Wall -O2 -pedantic-errors -c \"${workspaceFolder}\\libs\\utilities.c\" -o \"${workspaceFolder}\\libs\\obj\\Release\\utilities.o\")",
17-
"& (gcc -Wall -O2 -pedantic-errors -c \"${workspaceFolder}\\libs\\cells\\constructors.c\" -o \"${workspaceFolder}\\libs\\obj\\Release\\constructors.o\")",
18-
"& (gcc -Wall -O2 -pedantic-errors -c \"${workspaceFolder}\\libs\\cells\\methods.c\" -o \"${workspaceFolder}\\libs\\obj\\Release\\methods.o\")",
19-
"& (ar -r -s \"${workspaceFolder}\\libs\\bin\\Release\\libs.a\" \"${workspaceFolder}\\libs\\obj\\Release\\constructors.o\" \"${workspaceFolder}\\libs\\obj\\Release\\methods.o\" \"${workspaceFolder}\\libs\\obj\\Release\\utilities.o\")"
17+
"& (gcc -Wall -O2 -pedantic-errors -c \"${workspaceFolder}\\libs\\validators.c\" -o \"${workspaceFolder}\\libs\\obj\\Release\\validators.o\")",
18+
"& (gcc -Wall -O2 -pedantic-errors -c \"${workspaceFolder}\\libs\\patterns\\constructors.c\" -o \"${workspaceFolder}\\libs\\obj\\Release\\constructors.o\")",
19+
"& (gcc -Wall -O2 -pedantic-errors -c \"${workspaceFolder}\\libs\\patterns\\methods.c\" -o \"${workspaceFolder}\\libs\\obj\\Release\\methods.o\")",
20+
"& (ar -r -s \"${workspaceFolder}\\libs\\bin\\Release\\libs.a\" \"${workspaceFolder}\\libs\\obj\\Release\\constructors.o\" \"${workspaceFolder}\\libs\\obj\\Release\\methods.o\" \"${workspaceFolder}\\libs\\obj\\Release\\utilities.o\" \"${workspaceFolder}\\libs\\obj\\Release\\validators.o\")"
2021
],
2122
"group": {"kind": "build", "isDefault": false},
2223
"label": "Compile libs project",

README.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,17 @@ C-Practical-Work-2024/
9696
│ ├── main.h
9797
│ ├── utilities.c
9898
│ ├── utilities.h
99+
│ ├── validators.c
100+
│ ├── validators.h
99101
| |
100-
│ └── cells/
102+
│ └── patterns/
101103
│ ├── constructors.c
102104
│ ├── constructors.h
105+
│ ├── macros.h
106+
│ ├── main.h
103107
│ ├── methods.c
104-
│ └── methods.h
108+
│ ├── methods.h
109+
│ └── structs.h
105110
|
106111
├── .clang-format
107112
├── .gitignore
@@ -131,13 +136,18 @@ C-Practical-Work-2024/
131136
- **[main.h](./libs/main.h)** - File indexing all `.h` files of the project.
132137
- **[utilities.c](./libs/utilities.c)** - File with the implementation of the function prototypes found in `utilities.h`.
133138
- **[utilities.h](./libs/utilities.h)** - File with common structures and function prototypes.
134-
135-
- **[cells](./libs/cells)** - Functions and structures for `cell` entities.
136-
137-
- **[constructors.c](./libs/cells/constructors.c)** - File with the implementation of the function prototypes found in `constructors.h`.
138-
- **[constructors.h](./libs/cells/constructors.h)** - File with structures and function prototypes related to cell creation.
139-
- **[methods.c](./libs/cells/methods.c)** - File with the implementation of the function prototypes found in `methods.h`.
140-
- **[methods.h](./libs/cells/methods.h)** - File with function prototypes related to cell methods.
139+
- **[validators.c](./libs/validators.c)** - File with the implementation of the function prototypes found in `validators.h`.
140+
- **[validators.h](./libs/validators.h)** - File with functions prototypes related to validation process.
141+
142+
- **[patterns](./libs/patterns)** - Functions and structures for create patterns with cells.
143+
144+
- **[constructors.c](./libs/patterns/constructors.c)** - File with the implementation of the function prototypes found in `constructors.h`.
145+
- **[constructors.h](./libs/patterns/constructors.h)** - File with structures and function prototypes related to patterns creation.
146+
- **[macros.h](./libs/macros.h)** - File with macros.
147+
- **[main.h](./libs/main.h)** - File indexing all `.h` files inside `patterns` folder.
148+
- **[methods.c](./libs/patterns/methods.c)** - File with the implementation of the function prototypes found in `methods.h`.
149+
- **[methods.h](./libs/patterns/methods.h)** - File with function prototypes related to pattern methods.
150+
- **[structs.h](./libs/patterns/methods.h)** - File with structs.
141151

142152
- **[.clang-format](./.clang-format)** - Configuration file for the `clang-format` code formatting tool.
143153
- **[.gitignore](./.gitignore)** - Git configuration file to avoid tracking unwanted files.

libs/cells/constructors.c

Lines changed: 0 additions & 2 deletions
This file was deleted.

libs/cells/constructors.h

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)