# pablousky4/programacion_lineal architecture

> Architecture diagram of the GitHub repository pablousky4/programacion_lineal, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pablousky4/programacion_lineal
- Repository: https://github.com/pablousky4/programacion_lineal

## Overview

##### Project type and purpose
- From the file tree and README, this is a pure-Python, open-source tool/library (no web frontend or database) that models resource‐based unit power, likely as part of a linear-programming demo or educational game.
- Key purpose: load resource classes (Comida, Madera, Oro), load unit classes (Soldados, arqueros, espadachines, jinetes), compute “Poder” (power) via `Poder.py`, orchestrated by `main.py`.

##### File structure
- Top level:
- main.py – entry point (CLI or script)
- Poder.py – core computational logic (power calculation)
- requirements.txt – Python dependencies
- Package “Recursos/” (domain model for resources)
- Comida.py, Madera.py, Oro.py – one class each, implementing resource properties
- recursos.py – helper functions or aggregate class for resources
- Package “Unidades/” (domain model for units)
- Soldados.py, arqueros.py, espadachines.py, jinetes.py – each defines one unit type

##### README for additional insights
- The README only links to the GitHub repo and names the project (“programacion_lineal”).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Entry Layer"
        Main["main.py"]:::entry
    end

    subgraph "Business Logic Layer"
        Poder["Poder.py"]:::business
    end

    subgraph "Domain Model"
        subgraph "Recursos Package"
            Comida["Comida.py"]:::domain
            Madera["Madera.py"]:::domain
            Oro["Oro.py"]:::domain
            RecursosHelper["recursos.py"]:::domain
        end
        subgraph "Unidades Package"
            Soldados["Soldados.py"]:::domain
            Arqueros["arqueros.py"]:::domain
            Espadachines["espadachines.py"]:::domain
            Jinetes["jinetes.py"]:::domain
        end
    end

    External["requirements.txt"]:::external

    Main -->|"starts"| Poder
    Poder -->|"imports"| Comida
    Poder -->|"imports"| Madera
    Poder -->|"imports"| Oro
    Poder -->|"imports"| RecursosHelper
    Poder -->|"imports"| Soldados
    Poder -->|"imports"| Arqueros
    Poder -->|"imports"| Espadachines
    Poder -->|"imports"| Jinetes
    Main -->|"reads dependencies"| External

    click Main "https://github.com/pablousky4/programacion_lineal/blob/main/main.py"
    click Poder "https://github.com/pablousky4/programacion_lineal/blob/main/Poder.py"
    click Comida "https://github.com/pablousky4/programacion_lineal/blob/main/Recursos/Comida.py"
    click Madera "https://github.com/pablousky4/programacion_lineal/blob/main/Recursos/Madera.py"
    click Oro "https://github.com/pablousky4/programacion_lineal/blob/main/Recursos/Oro.py"
    click RecursosHelper "https://github.com/pablousky4/programacion_lineal/blob/main/Recursos/recursos.py"
    click Soldados "https://github.com/pablousky4/programacion_lineal/blob/main/Unidades/Soldados.py"
    click Arqueros "https://github.com/pablousky4/programacion_lineal/blob/main/Unidades/arqueros.py"
    click Espadachines "https://github.com/pablousky4/programacion_lineal/blob/main/Unidades/espadachines.py"
    click Jinetes "https://github.com/pablousky4/programacion_lineal/blob/main/Unidades/jinetes.py"
    click External "https://github.com/pablousky4/programacion_lineal/blob/main/requirements.txt"

    classDef entry fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef business fill:#90EE90,stroke:#333,stroke-width:1px
    classDef domain fill:#FFFF99,stroke:#333,stroke-width:1px
    classDef external fill:#D3D3D3,stroke:#333,stroke-width:1px
```
