# trsthales/desvendando-elifoot-98 architecture

> Architecture diagram of the GitHub repository trsthales/desvendando-elifoot-98, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/trsthales/desvendando-elifoot-98
- Repository: https://github.com/trsthales/desvendando-elifoot-98

## Overview

This repository documents reverse-engineered Elifoot 98 mechanics and provides C reconstructions of several algorithms. The principal computational workflow is pre-match sector-strength calculation, minute-by-minute match simulation, then post-match player-strength evolution. Discipline selection is a separate documented mechanic. The README describes additional findings—including formations, contracts, and attendance—but the tree contains no corresponding implementation modules. The workflow links are documented in the README; the excerpts do not show runtime calls between these modules.

Main entry points: [`src/match_engine.c`](https://github.com/trsthales/desvendando-elifoot-98/blob/main/src/match_engine.c) (Match Simulation), [`README.md`](https://github.com/trsthales/desvendando-elifoot-98/blob/main/README.md) (Mechanics Findings), [`src/team_calc.c`](https://github.com/trsthales/desvendando-elifoot-98/blob/main/src/team_calc.c) (Sector Strength), [`src/player_evolution.c`](https://github.com/trsthales/desvendando-elifoot-98/blob/main/src/player_evolution.c) (Strength Evolution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_match["Match Mechanics"]
  node_team_strength["Sector Strength<br/>[team_calc.c]"]
  node_simulation["Match Simulation<br/>[match_engine.c]"]
end

subgraph group_players["Player Mechanics"]
  node_evolution["Strength Evolution<br/>[player_evolution.c]"]
  node_discipline["Foul Selection<br/>[player_evolution.c]"]
end

subgraph group_research["Reverse-Engineering Findings"]
  node_findings["Mechanics Findings<br/>[README.md]"]
end

node_analyst(("Researcher"))

node_analyst -->|"reviews"| node_findings
node_team_strength -->|"supplies strengths"| node_simulation
node_simulation -->|"precedes post-match"| node_evolution
node_findings -->|"documents"| node_discipline

click node_team_strength "https://github.com/trsthales/desvendando-elifoot-98/blob/main/src/team_calc.c"
click node_simulation "https://github.com/trsthales/desvendando-elifoot-98/blob/main/src/match_engine.c"
click node_evolution "https://github.com/trsthales/desvendando-elifoot-98/blob/main/src/player_evolution.c"
click node_discipline "https://github.com/trsthales/desvendando-elifoot-98/blob/main/src/player_evolution.c"
click node_findings "https://github.com/trsthales/desvendando-elifoot-98/blob/main/README.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_team_strength,node_simulation toneBlue
class node_evolution,node_discipline toneAmber
class node_findings toneMint
class node_analyst toneIndigo
```

## Components

### Match Mechanics

- [Sector Strength](https://github.com/trsthales/desvendando-elifoot-98/blob/main/src/team_calc.c): `src/team_calc.c`
- [Match Simulation](https://github.com/trsthales/desvendando-elifoot-98/blob/main/src/match_engine.c): `src/match_engine.c`

### Player Mechanics

- [Strength Evolution](https://github.com/trsthales/desvendando-elifoot-98/blob/main/src/player_evolution.c): `src/player_evolution.c`
- [Foul Selection](https://github.com/trsthales/desvendando-elifoot-98/blob/main/src/player_evolution.c): `src/player_evolution.c`

### Reverse-Engineering Findings

- [Mechanics Findings](https://github.com/trsthales/desvendando-elifoot-98/blob/main/README.md): `README.md`

### Other components

- **Researcher**

## Connections

- Researcher → Mechanics Findings: reviews (evidence: `README.md`)
- Sector Strength → Match Simulation: supplies strengths (evidence: `README.md`)
- Match Simulation → Strength Evolution: precedes post-match (evidence: `README.md`)
- Mechanics Findings → Foul Selection: documents (evidence: `README.md`)
